*CtrlCore: Fixed error handling of SetClipboardData when handle is NULL

git-svn-id: svn://ultimatepp.org/upp/trunk@4633 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2012-02-29 14:31:34 +00:00
parent 45c726d65a
commit b5586ca84b

View file

@ -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);