--- /dev/null
+From 643edc26bcc8f8e083a97e87c2686f62ffd01f31 Mon Sep 17 00:00:00 2001
+From: Christoph Feck <cfeck@kde.org>
+Date: Thu, 30 Apr 2020 18:27:58 -0400
+Subject: Fix crash when clipboard is not available
+
+Summary:
+QClipboard::mimeData() can be nullptr according to documentation.
+
+BUG: 419722
+FIXED-IN: 1.8.3
+
+Reviewers: mreeves
+
+Reviewed By: mreeves
+
+Differential Revision: https://phabricator.kde.org/D29248
+---
+ src/pdiff.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/pdiff.cpp b/src/pdiff.cpp
+index f3f2284..3588e3e 100644
+--- a/src/pdiff.cpp
++++ b/src/pdiff.cpp
+@@ -1577,7 +1577,7 @@ void KDiff3App::slotClipboardChanged()
+ {
+ const QClipboard* clipboard = QApplication::clipboard();
+ const QMimeData* mimeData = clipboard->mimeData();
+- if(mimeData->hasText())
++ if(mimeData && mimeData->hasText())
+ {
+ QString s = clipboard->text();
+ editPaste->setEnabled(!s.isEmpty());
+--
+cgit v1.1
+
--- /dev/null
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+ECM_HANDBOOK="forceoptional"
+KFMIN=5.60.0
+QTMIN=5.12.3
+inherit ecm kde.org
+
+DESCRIPTION="Frontend to diff3 based on KDE Frameworks"
+HOMEPAGE="https://kde.org/applications/development/org.kde.kdiff3
+https://userbase.kde.org/KDiff3"
+SRC_URI="mirror://kde/stable/${PN}/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="5"
+KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
+IUSE=""
+
+DEPEND="
+ >=dev-qt/qtgui-${QTMIN}:5
+ >=dev-qt/qtprintsupport-${QTMIN}:5
+ >=dev-qt/qtwidgets-${QTMIN}:5
+ >=kde-frameworks/kconfig-${KFMIN}:5
+ >=kde-frameworks/kconfigwidgets-${KFMIN}:5
+ >=kde-frameworks/kcoreaddons-${KFMIN}:5
+ >=kde-frameworks/kcrash-${KFMIN}:5
+ >=kde-frameworks/ki18n-${KFMIN}:5
+ >=kde-frameworks/kiconthemes-${KFMIN}:5
+ >=kde-frameworks/kio-${KFMIN}:5
+ >=kde-frameworks/kparts-${KFMIN}:5
+ >=kde-frameworks/ktextwidgets-${KFMIN}:5
+ >=kde-frameworks/kwidgetsaddons-${KFMIN}:5
+ >=kde-frameworks/kxmlgui-${KFMIN}:5
+"
+RDEPEND="${DEPEND}
+ sys-apps/diffutils
+"
+
+PATCHES=( "${FILESDIR}/${P}-crash-w-o-clipboard.patch" )