[farsight2/master] Don't fail on NULL candidates in base functions
Olivier Crête
olivier.crete at collabora.co.uk
Tue Dec 16 10:03:26 PST 2008
---
gst-libs/gst/farsight/fs-candidate.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/gst-libs/gst/farsight/fs-candidate.c b/gst-libs/gst/farsight/fs-candidate.c
index 279320d..0042967 100644
--- a/gst-libs/gst/farsight/fs-candidate.c
+++ b/gst-libs/gst/farsight/fs-candidate.c
@@ -78,6 +78,9 @@ fs_candidate_list_get_type (void)
void
fs_candidate_destroy (FsCandidate * cand)
{
+ if (cand == NULL)
+ return;
+
g_free ((gchar *) cand->foundation);
g_free ((gchar *) cand->ip);
g_free ((gchar *) cand->base_ip);
@@ -100,6 +103,9 @@ fs_candidate_copy (const FsCandidate * cand)
{
FsCandidate *copy = g_slice_new0 (FsCandidate);
+ if (cand == NULL)
+ return NULL;
+
copy->component_id = cand->component_id;
copy->port = cand->port;
copy->base_port = cand->base_port;
--
1.5.6.5
More information about the farsight-commits
mailing list