diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | win/tkWinSend.c | 9 |
2 files changed, 9 insertions, 4 deletions
@@ -1,3 +1,7 @@ +2003-11-08 Pat Thoyts <patthoyts@users.sourceforge.net> + + * win/tclWinSend.c: Fixed an error returning the registered name. + 2003-11-08 Vince Darley <vincentdarley@users.sourceforge.net> * tests/textDisp.test: diff --git a/win/tkWinSend.c b/win/tkWinSend.c index 14a23c8..fcd6b4c 100644 --- a/win/tkWinSend.c +++ b/win/tkWinSend.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkWinSend.c,v 1.5 2003/10/08 21:49:57 patthoyts Exp $ + * RCS: @(#) $Id: tkWinSend.c,v 1.6 2003/11/08 22:53:01 patthoyts Exp $ */ #include "tkPort.h" @@ -585,11 +585,11 @@ RegisterInterp(CONST char *name, RegisteredInterp *riPtr) int i, offset; CONST char *actualName = name; Tcl_DString dString; - + Tcl_DStringInit(&dString); + hr = GetRunningObjectTable(0, &pROT); if (SUCCEEDED(hr)) { - Tcl_DStringInit(&dString); offset = 0; for (i = 1; SUCCEEDED(hr); i++) { @@ -621,12 +621,13 @@ RegisterInterp(CONST char *name, RegisteredInterp *riPtr) break; } - Tcl_DStringFree(&dString); pROT->lpVtbl->Release(pROT); } if (SUCCEEDED(hr)) riPtr->name = strdup(actualName); + + Tcl_DStringFree(&dString); return hr; } |