diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp index 50cf8437c7..86f2bc27dc 100644 --- a/src/qt/guiutil.cpp +++ b/src/qt/guiutil.cpp @@ -643,8 +643,11 @@ bool SetStartOnSystemStartup(bool fAutoStart) { return false; } void setClipboard(const QString& str) { - QApplication::clipboard()->setText(str, QClipboard::Clipboard); - QApplication::clipboard()->setText(str, QClipboard::Selection); + QClipboard* clipboard = QApplication::clipboard(); + clipboard->setText(str, QClipboard::Clipboard); + if (clipboard->supportsSelection()) { + clipboard->setText(str, QClipboard::Selection); + } } fs::path qstringToBoostPath(const QString &path)