diff options
author | hobbs <hobbs@noemail.net> | 2000-05-11 23:53:46 (GMT) |
---|---|---|
committer | hobbs <hobbs@noemail.net> | 2000-05-11 23:53:46 (GMT) |
commit | 71c25c072fc5aec2acb83ff682b8b1f395bf3616 (patch) | |
tree | 79fc57be1b16377b10a1b4d6b7c0c003f185d8f8 /win/tkWinTest.c | |
parent | b785a09e4311f5ebefd3257c3de0617340f0e0b1 (diff) | |
download | tk-71c25c072fc5aec2acb83ff682b8b1f395bf3616.zip tk-71c25c072fc5aec2acb83ff682b8b1f395bf3616.tar.gz tk-71c25c072fc5aec2acb83ff682b8b1f395bf3616.tar.bz2 |
* win/tkWinTest.c (TestclipboardObjCmd): ensured CloseClipboard
would always get called for each OpenClipboard.
FossilOrigin-Name: 3e266ca964ec815e9e47d1b720f2751491ae5cc3
Diffstat (limited to 'win/tkWinTest.c')
-rw-r--r-- | win/tkWinTest.c | 6 |
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; |