KMimeType::findByUrl() returning null pointer
Hamish Rodda
rodda at kde.org
Sat Sep 16 13:04:13 BST 2006
Hi,
I'm encountering a crash in KFileInfo from a dereference of a null mimetype
pointer in QString KFileItem::mimetype() const. It turns out that the file
(kdelibs/kate/tests/highlight.asm-avr) is detected as text/x-assembler, and
there is no corresponding desktop file so findByUrl() returns null.
What is the correct fix here (other than creating the x-assembler desktop
file, of course)... should KMimeType::findByUrl() check that the mimetype it
has looked up is valid before returning it? (The docs say that a null pointer
cannot be returned)
Cheers,
Hamish.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20060916/4da5572b/attachment.sig>
More information about the kde-core-devel
mailing list