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:<email address hidden>
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 {
Git commit 61e27b31f8f4b10 e1378ba700345ac ecc3b6c9c5 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:<email address hidden>
M +2 -1 nepomuk/ utils/utils. cpp
http:// commits. kde.org/ kdelibs/ 61e27b31f8f4b10 e1378ba700345ac ecc3b6c9c5
diff --git a/nepomuk/ utils/utils. cpp b/nepomuk/ utils/utils. cpp utils/utils. cpp utils/utils. cpp :Utils: :formatProperty Value( const Nepomuk: :Types: :Property& pro
index 5dab792..d4c1f28 100644
--- a/nepomuk/
+++ b/nepomuk/
@@ -138,7 +138,8 @@ QString Nepomuk:
}
else if(property == Vocabulary: :NIE::mimeType( )) { :mimeType( value.toString( ))->comment( ); :mimeType( value.toString( ));
- valueString = KMimeType:
+ KMimeType::Ptr mimeType = KMimeType:
+ valueString = (mimeType ? mimeType->comment() : value.toString());
}
else {