[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [15692] branches/soc-2008-quorn/intern/ ghost/intern/GHOST_SystemWin32.cpp: Bug fix for the bug fix.

Ian Thompson quornian at googlemail.com
Tue Jul 22 17:31:22 CEST 2008


Revision: 15692
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=15692
Author:   quorn
Date:     2008-07-22 17:31:22 +0200 (Tue, 22 Jul 2008)

Log Message:
-----------
Bug fix for the bug fix. Wasn't closing the clipboard before returning. Thanks b333rt for catching this.

Modified Paths:
--------------
    branches/soc-2008-quorn/intern/ghost/intern/GHOST_SystemWin32.cpp

Modified: branches/soc-2008-quorn/intern/ghost/intern/GHOST_SystemWin32.cpp
===================================================================
--- branches/soc-2008-quorn/intern/ghost/intern/GHOST_SystemWin32.cpp	2008-07-22 14:56:02 UTC (rev 15691)
+++ branches/soc-2008-quorn/intern/ghost/intern/GHOST_SystemWin32.cpp	2008-07-22 15:31:22 UTC (rev 15692)
@@ -917,10 +917,12 @@
 	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);





More information about the Bf-blender-cvs mailing list