From 2ac86b58e0f5e74a7224e86f3830122f47ad3938 Mon Sep 17 00:00:00 2001 From: krepa098 Date: Sat, 7 Feb 2015 17:39:56 +0100 Subject: [PATCH] do not change clipboard content if selected text is null --- src/chatlog/chatlog.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/chatlog/chatlog.cpp b/src/chatlog/chatlog.cpp index 829b29aa9..673f6cb4e 100644 --- a/src/chatlog/chatlog.cpp +++ b/src/chatlog/chatlog.cpp @@ -520,9 +520,10 @@ void ChatLog::clear() void ChatLog::copySelectedText() const { QString text = getSelectedText(); - QClipboard* clipboard = QApplication::clipboard(); - clipboard->setText(text); + + if(clipboard && !text.isNull()) + clipboard->setText(text); } void ChatLog::setBusyNotification(ChatLine::Ptr notification)