Bugfix: Pasting non-text data (or trying to retrieve non-text data from the clipboard...
authorIan Thompson <quornian@googlemail.com>
Tue, 22 Jul 2008 14:56:02 +0000 (14:56 +0000)
committerIan Thompson <quornian@googlemail.com>
Tue, 22 Jul 2008 14:56:02 +0000 (14:56 +0000)
intern/ghost/intern/GHOST_SystemWin32.cpp

index f5c7c08ebfe1d71ec5e68647413009b7485b65a5..0b42fb8029529fc180d916d9189bf0f6f1f7b0e9 100644 (file)
@@ -919,6 +919,8 @@ GHOST_TUns8* GHOST_SystemWin32::getClipboard(int flag) const
        
        if ( OpenClipboard(NULL) ) {
                HANDLE hData = GetClipboardData( CF_TEXT );
+               if (hData == NULL)
+                       return NULL;
                buffer = (char*)GlobalLock( hData );
                
                temp_buff = (char*) malloc(strlen(buffer)+1);