matroska: do not try to call gst_pad_query_default on a NULL pad
authorVincent Penquerc'h <vincent.penquerch@collabora.co.uk>
Fri, 2 May 2014 10:39:39 +0000 (11:39 +0100)
committerVincent Penquerc'h <vincent.penquerch@collabora.co.uk>
Fri, 2 May 2014 10:39:39 +0000 (11:39 +0100)
gst_matroska_parse_query can be called explicitely with a NULL pad.
If we reach this point with a NULL pad, fail the query.

Coverity 1139715

gst/matroska/matroska-parse.c

index 89f23d8..c53bcf3 100644 (file)
@@ -1046,7 +1046,8 @@ gst_matroska_parse_query (GstMatroskaParse * parse, GstPad * pad,
       break;
     }
     default:
-      res = gst_pad_query_default (pad, (GstObject *) parse, query);
+      if (pad)
+        res = gst_pad_query_default (pad, (GstObject *) parse, query);
       break;
   }