summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM/src
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/TabSRMM/src')
-rw-r--r--plugins/TabSRMM/src/generic_msghandlers.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/plugins/TabSRMM/src/generic_msghandlers.cpp b/plugins/TabSRMM/src/generic_msghandlers.cpp
index 8fcb10d750..dc427efe51 100644
--- a/plugins/TabSRMM/src/generic_msghandlers.cpp
+++ b/plugins/TabSRMM/src/generic_msghandlers.cpp
@@ -1100,10 +1100,13 @@ LRESULT TSAPI DM_WMCopyHandler(HWND hwnd, WNDPROC oldWndProc, UINT msg, WPARAM w
LRESULT result = mir_callNextSubclass(hwnd, oldWndProc, msg, wParam, lParam);
ptrA szFromStream(Message_GetFromStream(hwnd, SF_TEXT | SFF_SELECTION));
- ptrW converted(mir_utf8decodeW(szFromStream));
-
- Utils::FilterEventMarkers(converted);
- Utils::CopyToClipBoard(converted, hwnd);
+ if (szFromStream != NULL) {
+ ptrW converted(mir_utf8decodeW(szFromStream));
+ if (converted != NULL) {
+ Utils::FilterEventMarkers(converted);
+ Utils::CopyToClipBoard(converted, hwnd);
+ }
+ }
return result;
}