From a0bc24558e64af486c515d71d1e4d1caf6651deb Mon Sep 17 00:00:00 2001 From: Vincent Penquerc'h Date: Fri, 2 May 2014 11:39:39 +0100 Subject: [PATCH] matroska: do not try to call gst_pad_query_default on a NULL pad 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 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gst/matroska/matroska-parse.c b/gst/matroska/matroska-parse.c index 89f23d8722..c53bcf3fdd 100644 --- a/gst/matroska/matroska-parse.c +++ b/gst/matroska/matroska-parse.c @@ -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; }