[Bug 948973] [kdelibs/KDE/4.8] nepomuk/utils: KMimeType::mimeType() can return null if the mimetype is not found, so check the pointer before we use it to avoid crashing.
Jonathan Thomas
echidnaman at kubuntu.org
Sun Apr 1 22:23:15 UTC 2012
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:948973 at 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 Kubuntu
Bugs, which is subscribed to kde4libs in 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
More information about the kubuntu-bugs
mailing list