summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhobbs <hobbs>2000-05-11 23:53:46 (GMT)
committerhobbs <hobbs>2000-05-11 23:53:46 (GMT)
commit1ea53a2f8a8455b3b74dc1c3b5369a7e485aa734 (patch)
tree79fc57be1b16377b10a1b4d6b7c0c003f185d8f8
parente35f0532d8a470033aeebed15dc3f9bbd1673942 (diff)
downloadtk-1ea53a2f8a8455b3b74dc1c3b5369a7e485aa734.zip
tk-1ea53a2f8a8455b3b74dc1c3b5369a7e485aa734.tar.gz
tk-1ea53a2f8a8455b3b74dc1c3b5369a7e485aa734.tar.bz2
* win/tkWinTest.c (TestclipboardObjCmd): ensured CloseClipboard
would always get called for each OpenClipboard.
-rw-r--r--win/tkWinTest.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/win/tkWinTest.c b/win/tkWinTest.c
index 6f7ee7e..5df298b 100644
--- a/win/tkWinTest.c
+++ b/win/tkWinTest.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkWinTest.c,v 1.3 2000/04/12 18:51:11 hobbs Exp $
+ * RCS: @(#) $Id: tkWinTest.c,v 1.4 2000/05/11 23:53:46 hobbs Exp $
*/
#include "tkWinInt.h"
@@ -89,6 +89,7 @@ TestclipboardObjCmd(clientData, interp, objc, objv)
TkWindow *winPtr = (TkWindow *) clientData;
HGLOBAL handle;
char *data;
+ int code = TCL_OK;
if (objc != 1) {
Tcl_WrongNumArgs(interp, 1, objv, (char *) NULL);
@@ -108,9 +109,10 @@ TestclipboardObjCmd(clientData, interp, objc, objv)
GlobalUnlock(handle);
} else {
Tcl_AppendResult(interp, "null clipboard handle", (char *) NULL);
- return TCL_ERROR;
+ code = TCL_ERROR;
}
CloseClipboard();
+ return code;
} else {
Tcl_AppendResult(interp, "couldn't open clipboard", (char *) NULL);
return TCL_ERROR;