Review Request 118450: Add null-pointer safety check to KonqOperations::pasteInfo(const KUrl&) (to fix a crash on Wayland)

Frank Reininghaus frank78ac at
Sun Jun 1 13:32:47 BST 2014

This is an automatically generated e-mail. To reply, visit:

Review request for KDE Base Apps and David Faure.

Bugs: 335053

Repository: kde-baseapps


According to a recent bug report, QApplication::clipboard()->mimeData() may return 0 on Wayland, which causes Dolphin to crash on startup (we check the clipboard contents on startup to determine the text of the "Paste" action).

While this is might be a bug in Qt's Wayland support itself (I could not do any tests myself because I have not worked with Wayland yet), we can at least try to work around the problem by checking the return value of that function before we dereference the pointer.

This patch is for master, even though master can probably not be used on Wayland at all, but I think that adding a null-pointer check already there and merging it to frameworks then does not hurt. If it is preferred to fix this in the frameworks branch only, this is also fine for me.


  lib/konq/konq_operations.cpp 781ea1e 



Updating the text of the paste action still seems to work fine. I could not test if it fixes the crash, but I'm pretty sure that at least a crash with the reported backtrace will not happen any more.


Frank Reininghaus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the kde-core-devel mailing list