diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp index b4afdbcc22..a5d0f244ce 100644 --- a/src/qt/guiutil.cpp +++ b/src/qt/guiutil.cpp @@ -628,8 +628,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)