[0.11] gstreamer: gstvalue: handle NULL dest in bitmask/ bitmask intersection

Vincent Penquerc'h vincent at kemper.freedesktop.org
Tue Jan 24 06:41:36 PST 2012


Module: gstreamer
Branch: 0.11
Commit: fc1fab8a15e88d54df1507298797db56fc376dea
URL:    http://cgit.freedesktop.org/gstreamer/gstreamer/commit/?id=fc1fab8a15e88d54df1507298797db56fc376dea

Author: Vincent Penquerc'h <vincent.penquerch at collabora.co.uk>
Date:   Tue Jan 24 14:40:33 2012 +0000

gstvalue: handle NULL dest in bitmask/bitmask intersection

---

 gst/gstvalue.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/gst/gstvalue.c b/gst/gstvalue.c
index 75a5362..1b91ee6 100644
--- a/gst/gstvalue.c
+++ b/gst/gstvalue.c
@@ -5307,8 +5307,10 @@ gst_value_intersect_bitmask_bitmask (GValue * dest, const GValue * src1,
   s1 = gst_value_get_bitmask (src1);
   s2 = gst_value_get_bitmask (src2);
 
-  g_value_init (dest, GST_TYPE_BITMASK);
-  gst_value_set_bitmask (dest, s1 & s2);
+  if (dest) {
+    g_value_init (dest, GST_TYPE_BITMASK);
+    gst_value_set_bitmask (dest, s1 & s2);
+  }
 
   return TRUE;
 }



More information about the gstreamer-commits mailing list