From cc65145eb1a2fdb2fd269eafc14501a548104d9a Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Mon, 2 Sep 2013 12:18:07 -0300 Subject: [PATCH] pad-monitor: Check if iterator exists before trying to use it --- validate/gst/validate/gst-validate-pad-monitor.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/validate/gst/validate/gst-validate-pad-monitor.c b/validate/gst/validate/gst-validate-pad-monitor.c index 6ce42ef318..4bdaaf82b7 100644 --- a/validate/gst/validate/gst-validate-pad-monitor.c +++ b/validate/gst/validate/gst-validate-pad-monitor.c @@ -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, };