mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-23 18:32:49 +00:00
kimgio: check if the KMimeType pointer is still valid in RAWPlugin::mimeTypes()
can be invalidated during sycoca database update, fixes possible crash Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
59e28bfa08
commit
2ce7ac3843
1 changed files with 1 additions and 1 deletions
|
@ -175,7 +175,7 @@ QList<QByteArray> RAWPlugin::mimeTypes() const
|
|||
if (list.isEmpty()) {
|
||||
foreach (const KMimeType::Ptr &mime, KMimeType::allMimeTypes()) {
|
||||
// NOTE: RAW MIME types are sub-class of image/x-dcraw
|
||||
if (mime->is(QString::fromLatin1("image/x-dcraw"))
|
||||
if (mime && mime->is(QString::fromLatin1("image/x-dcraw"))
|
||||
&& mime->name() != QLatin1String("image/x-dcraw")) {
|
||||
list.append(mime->name().toLatin1());
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue