From 1ea53a2f8a8455b3b74dc1c3b5369a7e485aa734 Mon Sep 17 00:00:00 2001 From: hobbs Date: Thu, 11 May 2000 23:53:46 +0000 Subject: * win/tkWinTest.c (TestclipboardObjCmd): ensured CloseClipboard would always get called for each OpenClipboard. --- win/tkWinTest.c | 6 ++++-- 1 file 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; -- cgit v0.12