diff options
author | Ian Thompson <quornian@googlemail.com> | 2008-07-22 19:31:22 +0400 |
---|---|---|
committer | Ian Thompson <quornian@googlemail.com> | 2008-07-22 19:31:22 +0400 |
commit | 6d0e840648b1349302ea20891598806beddb6714 (patch) | |
tree | 5a970cf53a72995e535e8b85998154f19b2b88f2 /intern | |
parent | 20af6c61e8d76764d29e800924963fd770ae5acd (diff) |
Bug fix for the bug fix. Wasn't closing the clipboard before returning. Thanks b333rt for catching this.
Diffstat (limited to 'intern')
-rw-r--r-- | intern/ghost/intern/GHOST_SystemWin32.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/intern/ghost/intern/GHOST_SystemWin32.cpp b/intern/ghost/intern/GHOST_SystemWin32.cpp index 0b42fb80295..7bc20d38739 100644 --- a/intern/ghost/intern/GHOST_SystemWin32.cpp +++ b/intern/ghost/intern/GHOST_SystemWin32.cpp @@ -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); |