summaryrefslogtreecommitdiffstats
path: root/generic/tkObj.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2001-08-17 09:38:30 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2001-08-17 09:38:30 (GMT)
commit77fdd33b6f58df7debc680e447508f50da6f9397 (patch)
tree097999f2d5548ea5ae2beac3be1a42b918574aa0 /generic/tkObj.c
parentcfd891ddef41cc919a6fa617fd71fc9a05cf6a8b (diff)
downloadtk-77fdd33b6f58df7debc680e447508f50da6f9397.zip
tk-77fdd33b6f58df7debc680e447508f50da6f9397.tar.gz
tk-77fdd33b6f58df7debc680e447508f50da6f9397.tar.bz2
Fixed a stupid error that's been in there for ages...
Diffstat (limited to 'generic/tkObj.c')
-rw-r--r--generic/tkObj.c13
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;
}
/*