SUMMARY On some platforms (e.g. `-platform vnc`), `QClipboard::mimeData` will return `nullptr` (according to https://doc.qt.io/qt-5/qclipboard.html#mimeData and observed in practice). STEPS TO REPRODUCE 1. Run `kdiff3 -platform vnc`. OBSERVED RESULT Segmentation fault. EXPECTED RESULT Application starting (and serving VNC on port 5900). SOFTWARE/OS VERSIONS KDE Frameworks Version: 5.66.0 Qt Version: 5.12.7 ADDITIONAL INFORMATION Likely introduced by https://invent.kde.org/kde/kdiff3/-/commit/d7507c80bb87cbd5010a4b2301ec7511ff77f2b4. Simplest fix (not tested) seems like it would be replacing: if(mimeData->hasText()) with: if(mimeData && mimeData->hasText())
Git commit 48c0deaf53eb5c8ab60deabfa59551c8bcca5612 by Michael Reeves, on behalf of Christoph Feck. Committed on 30/04/2020 at 22:38. Pushed by mreeves into branch 'master'. Fix crash when clipboard is not available Summary: QClipboard::mimeData() can be nullptr according to documentation. FIXED-IN: 1.8.3 Reviewers: mreeves Reviewed By: mreeves Differential Revision: https://phabricator.kde.org/D29248 M +1 -1 src/pdiff.cpp https://invent.kde.org/kde/kdiff3/commit/48c0deaf53eb5c8ab60deabfa59551c8bcca5612
Git commit 643edc26bcc8f8e083a97e87c2686f62ffd01f31 by Michael Reeves, on behalf of Christoph Feck. Committed on 30/04/2020 at 22:44. Pushed by mreeves into branch '1.8'. Fix crash when clipboard is not available Summary: QClipboard::mimeData() can be nullptr according to documentation. FIXED-IN: 1.8.3 Reviewers: mreeves Reviewed By: mreeves Differential Revision: https://phabricator.kde.org/D29248 M +1 -1 src/pdiff.cpp https://invent.kde.org/kde/kdiff3/commit/643edc26bcc8f8e083a97e87c2686f62ffd01f31