From 28a5e958778bae84618a6eb57e4864d37c07cd0c Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 16 May 2015 22:03:28 +0000 Subject: crash fix git-svn-id: http://svn.miranda-ng.org/main/trunk@13657 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/TabSRMM/src/generic_msghandlers.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'plugins') 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; } -- cgit v1.2.3