[plugins/clipboard] Check for null mimedata

BUG: 461875
(cherry picked from commit 1fbbeb823d)
This commit is contained in:
Nicolas Fella 2022-11-17 23:42:08 +01:00
parent df8248e9e8
commit e5c117eb68

View file

@ -61,7 +61,7 @@ void ClipboardListener::updateClipboard(QClipboard::Mode mode)
}
ClipboardListener::ClipboardContentType contentType = ClipboardListener::ClipboardContentTypeUnknown;
if (clipboard->mimeData(mode)->data(QStringLiteral("x-kde-passwordManagerHint")) == QByteArrayLiteral("secret")) {
if (clipboard->mimeData(mode) && clipboard->mimeData(mode)->data(QStringLiteral("x-kde-passwordManagerHint")) == QByteArrayLiteral("secret")) {
contentType = ClipboardListener::ClipboardContentTypePassword;
}