[plugins/clipboard] Check for null mimedata

BUG: 461875
This commit is contained in:
Nicolas Fella 2022-11-17 23:42:08 +01:00 committed by Aleix Pol Gonzalez
parent 01d18a7cbc
commit 1fbbeb823d

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;
}