Bug fix for the bug fix. Wasn't closing the clipboard before returning. Thanks b333rt for catching this.
This commit is contained in:
parent
20af6c61e8
commit
6d0e840648
|
@ -917,10 +917,12 @@ GHOST_TUns8* GHOST_SystemWin32::getClipboard(int flag) const
|
|||
char *buffer;
|
||||
char *temp_buff;
|
||||
|
||||
if ( OpenClipboard(NULL) ) {
|
||||
if ( IsClipboardFormatAvailable(CF_TEXT) && OpenClipboard(NULL) ) {
|
||||
HANDLE hData = GetClipboardData( CF_TEXT );
|
||||
if (hData == NULL)
|
||||
if (hData == NULL) {
|
||||
CloseClipboard();
|
||||
return NULL;
|
||||
}
|
||||
buffer = (char*)GlobalLock( hData );
|
||||
|
||||
temp_buff = (char*) malloc(strlen(buffer)+1);
|
||||
|
|
Loading…
Reference in New Issue