diff options
author | donal.k.fellows@manchester.ac.uk <dkf> | 2001-08-17 09:38:30 (GMT) |
---|---|---|
committer | donal.k.fellows@manchester.ac.uk <dkf> | 2001-08-17 09:38:30 (GMT) |
commit | a73798179a136ce958488be28a6a99db65bef8cf (patch) | |
tree | 097999f2d5548ea5ae2beac3be1a42b918574aa0 /generic/tkObj.c | |
parent | 43fee6007869d09f0888828d83520ef5a6888167 (diff) | |
download | tk-a73798179a136ce958488be28a6a99db65bef8cf.zip tk-a73798179a136ce958488be28a6a99db65bef8cf.tar.gz tk-a73798179a136ce958488be28a6a99db65bef8cf.tar.bz2 |
Fixed a stupid error that's been in there for ages...
Diffstat (limited to 'generic/tkObj.c')
-rw-r--r-- | generic/tkObj.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/generic/tkObj.c b/generic/tkObj.c index 1a4372b..2fdc710 100644 --- a/generic/tkObj.c +++ b/generic/tkObj.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkObj.c,v 1.5 2001/08/15 15:44:36 dkf Exp $ + * RCS: @(#) $Id: tkObj.c,v 1.6 2001/08/17 09:38:30 dkf Exp $ */ #include "tkInt.h" @@ -669,12 +669,13 @@ TkGetWindowFromObj(interp, tkwin, objPtr, windowPtr) register Tcl_Obj *objPtr; /* The object from which to get boolean. */ Tk_Window *windowPtr; /* Place to store resulting window. */ { - register int result; Tk_Window lastWindow; - result = SetWindowFromAny(interp, objPtr); - if (result != TCL_OK) { - return result; + if (objPtr->typePtr != &windowObjType) { + register int result = SetWindowFromAny(interp, objPtr); + if (result != TCL_OK) { + return result; + } } lastWindow = (Tk_Window) objPtr->internalRep.twoPtrValue.ptr1; @@ -690,7 +691,7 @@ TkGetWindowFromObj(interp, tkwin, objPtr, windowPtr) } *windowPtr = (Tk_Window) objPtr->internalRep.twoPtrValue.ptr2; - return result; + return TCL_OK; } /* |