From 20af6c61e8d76764d29e800924963fd770ae5acd Mon Sep 17 00:00:00 2001 From: Ian Thompson Date: Tue, 22 Jul 2008 14:56:02 +0000 Subject: [PATCH] Bugfix: Pasting non-text data (or trying to retrieve non-text data from the clipboard) crashed blender on Windows. --- intern/ghost/intern/GHOST_SystemWin32.cpp | 2 ++ 1 file changed, 2 insertions(+) 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);