pad-monitor: Check if iterator exists before trying to use it
authorEdward Hervey <edward@collabora.com>
Mon, 2 Sep 2013 15:18:07 +0000 (12:18 -0300)
committerThiago Santos <thiago.sousa.santos@collabora.com>
Mon, 2 Sep 2013 15:18:07 +0000 (12:18 -0300)
validate/gst/validate/gst-validate-pad-monitor.c

index 6ce42ef..4bdaaf8 100644 (file)
@@ -701,6 +701,13 @@ static void
   iter =
       gst_pad_iterate_internal_links (GST_VALIDATE_PAD_MONITOR_GET_PAD
       (monitor));
+
+  if (iter == NULL) {
+    GST_WARNING_OBJECT (GST_VALIDATE_PAD_MONITOR_GET_PAD (monitor),
+        "No iterator available");
+    return;
+  }
+
   done = FALSE;
   while (!done) {
     GValue value = { 0, };