From: Edward Hervey Date: Mon, 2 Sep 2013 15:11:25 +0000 (-0300) Subject: element-monitor: protect agains elements that have no klass X-Git-Tag: 1.19.3~491^2~2445 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fb58e16c5a0e1a21c698139436471dec1c5176c0;p=platform%2Fupstream%2Fgstreamer.git element-monitor: protect agains elements that have no klass --- diff --git a/validate/gst/validate/gst-validate-element-monitor.c b/validate/gst/validate/gst-validate-element-monitor.c index 39d1f54..b1983a8 100644 --- a/validate/gst/validate/gst-validate-element-monitor.c +++ b/validate/gst/validate/gst-validate-element-monitor.c @@ -132,9 +132,12 @@ gst_validate_element_monitor_inspect (GstValidateElementMonitor * monitor) klassname = gst_element_class_get_metadata (klass, GST_ELEMENT_METADATA_KLASS); - monitor->is_decoder = strstr (klassname, "Decoder") != NULL; - monitor->is_encoder = strstr (klassname, "Encoder") != NULL; - monitor->is_demuxer = strstr (klassname, "Demuxer") != NULL; + if (klassname) { + monitor->is_decoder = strstr (klassname, "Decoder") != NULL; + monitor->is_encoder = strstr (klassname, "Encoder") != NULL; + monitor->is_demuxer = strstr (klassname, "Demuxer") != NULL; + } else + GST_ERROR_OBJECT (element, "no klassname"); } static gboolean