From b5586ca84b5784b7d977f5c6f248dbcdb5bbcab7 Mon Sep 17 00:00:00 2001 From: cxl Date: Wed, 29 Feb 2012 14:31:34 +0000 Subject: [PATCH] *CtrlCore: Fixed error handling of SetClipboardData when handle is NULL git-svn-id: svn://ultimatepp.org/upp/trunk@4633 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/CtrlCore/Win32Clip.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uppsrc/CtrlCore/Win32Clip.cpp b/uppsrc/CtrlCore/Win32Clip.cpp index 601aea645..c067a8c1b 100644 --- a/uppsrc/CtrlCore/Win32Clip.cpp +++ b/uppsrc/CtrlCore/Win32Clip.cpp @@ -131,7 +131,7 @@ void SetClipboardRaw(int format, const byte *data, int length) ptr[length + 1] = 0; GlobalUnlock(handle); } - if(!SetClipboardData(format, handle)) { + if(SetClipboardData(format, handle) != handle) { ClipboardError("SetCliboardData", format); LLOG("SetClipboardData error: " << GetLastErrorMessage()); GlobalFree(handle);