summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.net>2005-07-31 20:21:45 +0000
committerTim-Philipp Müller <tim@centricular.net>2005-07-31 20:21:45 +0000
commit21e493150d2e8a64ce7a952adcf3b6603f525839 (patch)
tree289d3d374a1dcf4caa7753effa059bed4c74da00
parent6f358dcc1240add636c71f1de39b140cd384abe3 (diff)
downloadgstreamer-plugins-bad-21e493150d2e8a64ce7a952adcf3b6603f525839.tar.gz
gst/modplug/gstmodplug.cc: Don't crash if a query comes in and we're not set up yet (fixes #312121).
Original commit message from CVS: Reviewed by: Tim-Philipp Müller <tim at centricular dot net> * gst/modplug/gstmodplug.cc: Don't crash if a query comes in and we're not set up yet (fixes #312121).
-rw-r--r--ChangeLog8
-rw-r--r--gst/modplug/gstmodplug.cc3
2 files changed, 11 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 137b7e37e..3cef9b08c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2005-07-31 Jonathan Matthew <jonathan at kaolin dot hn dot org>
+
+ Reviewed by: Tim-Philipp Müller <tim at centricular dot net>
+
+ * gst/modplug/gstmodplug.cc:
+ Don't crash if a query comes in and we're not set
+ up yet (fixes #312121).
+
2005-07-28 Tim-Philipp Müller <tim at centricular dot net>
* testsuite/gst-lint:
diff --git a/gst/modplug/gstmodplug.cc b/gst/modplug/gstmodplug.cc
index 6d4c4ab53..afdcf3ce2 100644
--- a/gst/modplug/gstmodplug.cc
+++ b/gst/modplug/gstmodplug.cc
@@ -333,6 +333,9 @@ gst_modplug_src_query (GstPad * pad, GstQueryType type,
modplug = GST_MODPLUG (gst_pad_get_parent (pad));
+ if (!modplug->mSoundFile)
+ return FALSE;
+
switch (type) {
case GST_QUERY_TOTAL:
switch (*format) {