[Bug 847748] [libqapt] utils/qapt-gst-helper: QGst::Caps::fromString() can return null if no caps are found for a particular string.

Jonathan Thomas echidnaman at kubuntu.org
Wed Sep 14 21:26:41 UTC 2011


Git commit 42df5936b33000dde9c7ecd6eb9206ae549933a7 by Jonathan Thomas.
Committed on 14/09/2011 at 23:24.
Pushed by jmthomas into branch 'master'.

QGst::Caps::fromString() can return null if no caps are found for a particular string.
Check this return value, rather than assuming it works and crashing.

CCMAIL:847748 at bugs.launchpad.net

M  +1    -1    utils/qapt-gst-helper/GstMatcher.cpp

http://commits.kde.org/libqapt/42df5936b33000dde9c7ecd6eb9206ae549933a7

diff --git a/utils/qapt-gst-helper/GstMatcher.cpp b/utils/qapt-gst-helper/GstMatcher.cpp
index a1a4347..6527571 100644
--- a/utils/qapt-gst-helper/GstMatcher.cpp
+++ b/utils/qapt-gst-helper/GstMatcher.cpp
@@ -89,7 +89,7 @@ GstMatcher::GstMatcher(const QStringList &values)
             }
 
             QGst::CapsPtr caps = QGst::Caps::fromString(capsString);
-            if (caps->isEmpty()) {
+            if (!caps || caps->isEmpty()) {
                 continue;
             }

-- 
You received this bug notification because you are a member of Kubuntu
Bugs, which is subscribed to qapt in Ubuntu.
https://bugs.launchpad.net/bugs/847748

Title:
  qapt-gst-helper, segmentation fault searching codec for dragonplayer

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/qapt/+bug/847748/+subscriptions



More information about the kubuntu-bugs mailing list