Git commit 61e27b31f8f4b10e1378ba700345acecc3b6c9c5 by Jonathan Thomas.
Committed on 02/04/2012 at 00:21.
Pushed by jmthomas into branch 'KDE/4.8'.

KMimeType::mimeType() can return null if the mimetype is not found, so
check the pointer before we use it to avoid crashing.

CCMAIL:948...@bugs.launchpad.net

M  +2    -1    nepomuk/utils/utils.cpp

http://commits.kde.org/kdelibs/61e27b31f8f4b10e1378ba700345acecc3b6c9c5

diff --git a/nepomuk/utils/utils.cpp b/nepomuk/utils/utils.cpp
index 5dab792..d4c1f28 100644
--- a/nepomuk/utils/utils.cpp
+++ b/nepomuk/utils/utils.cpp
@@ -138,7 +138,8 @@ QString Nepomuk::Utils::formatPropertyValue( const 
Nepomuk::Types::Property& pro
     }
 
     else if(property == Vocabulary::NIE::mimeType()) {
-        valueString = KMimeType::mimeType(value.toString())->comment();
+        KMimeType::Ptr mimeType = KMimeType::mimeType(value.toString());
+        valueString = (mimeType ? mimeType->comment() : value.toString());
     }
 
     else {

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

Title:
  kfilemetadatareader crashed with SIGSEGV in d_func()

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

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to