diff options
author | Ian Thompson <quornian@googlemail.com> | 2008-07-22 18:56:02 +0400 |
---|---|---|
committer | Ian Thompson <quornian@googlemail.com> | 2008-07-22 18:56:02 +0400 |
commit | 20af6c61e8d76764d29e800924963fd770ae5acd (patch) | |
tree | 919f75b76117564a3ef1577235c50a8de8d3b9b9 /intern/ghost | |
parent | 07b8c7e88765be111c0355ab8206cc3f2661a60d (diff) |
Bugfix: Pasting non-text data (or trying to retrieve non-text data from the clipboard) crashed blender on Windows.
Diffstat (limited to 'intern/ghost')
-rw-r--r-- | intern/ghost/intern/GHOST_SystemWin32.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/intern/ghost/intern/GHOST_SystemWin32.cpp b/intern/ghost/intern/GHOST_SystemWin32.cpp index f5c7c08ebfe..0b42fb80295 100644 --- a/intern/ghost/intern/GHOST_SystemWin32.cpp +++ b/intern/ghost/intern/GHOST_SystemWin32.cpp @@ -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); |