From 21e493150d2e8a64ce7a952adcf3b6603f525839 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Sun, 31 Jul 2005 20:21:45 +0000 Subject: gst/modplug/gstmodplug.cc: Don't crash if a query comes in and we're not set up yet (fixes #312121). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Original commit message from CVS: Reviewed by: Tim-Philipp Müller * gst/modplug/gstmodplug.cc: Don't crash if a query comes in and we're not set up yet (fixes #312121). --- ChangeLog | 8 ++++++++ gst/modplug/gstmodplug.cc | 3 +++ 2 files changed, 11 insertions(+) diff --git a/ChangeLog b/ChangeLog index 137b7e37..3cef9b08 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2005-07-31 Jonathan Matthew + + Reviewed by: Tim-Philipp Müller + + * 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 * testsuite/gst-lint: diff --git a/gst/modplug/gstmodplug.cc b/gst/modplug/gstmodplug.cc index 6d4c4ab5..afdcf3ce 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) { -- cgit v1.2.1