diff options
author | a_kovalenko <a_kovalenko> | 2010-06-22 14:02:31 (GMT) |
---|---|---|
committer | a_kovalenko <a_kovalenko> | 2010-06-22 14:02:31 (GMT) |
commit | eaa472eda7c92abd87df99c5208082825dbd146d (patch) | |
tree | d856dc2e8d1d9e3021184b4669eba49c4902cc91 /generic/tkPlace.c | |
parent | af5c7cf0c34274560634e544d70228d63ed259d9 (diff) | |
download | tk-eaa472eda7c92abd87df99c5208082825dbd146d.zip tk-eaa472eda7c92abd87df99c5208082825dbd146d.tar.gz tk-eaa472eda7c92abd87df99c5208082825dbd146d.tar.bz2 |
[Patch #3019624] fix "place" command segfault on half-dead app main window.
Diffstat (limited to 'generic/tkPlace.c')
-rw-r--r-- | generic/tkPlace.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/generic/tkPlace.c b/generic/tkPlace.c index 3586014..62ea86d 100644 --- a/generic/tkPlace.c +++ b/generic/tkPlace.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: tkPlace.c,v 1.29 2010/01/02 22:52:38 dkf Exp $ + * RCS: @(#) $Id: tkPlace.c,v 1.30 2010/06/22 14:02:32 a_kovalenko Exp $ */ #include "tkInt.h" @@ -205,11 +205,12 @@ static void UnlinkSlave(Slave *slavePtr); int Tk_PlaceObjCmd( - ClientData clientData, /* NULL. */ + ClientData clientData, /* Interpreter main window. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { + Tk_Window main_win = clientData; Tk_Window tkwin; Slave *slavePtr; TkDisplay *dispPtr; @@ -237,7 +238,7 @@ Tk_PlaceObjCmd( */ if (Tcl_GetString(objv[1])[0] == '.') { - if (TkGetWindowFromObj(interp, Tk_MainWindow(interp), objv[1], + if (TkGetWindowFromObj(interp, main_win, objv[1], &tkwin) != TCL_OK) { return TCL_ERROR; } @@ -261,7 +262,7 @@ Tk_PlaceObjCmd( * possible additional arguments. */ - if (TkGetWindowFromObj(interp, Tk_MainWindow(interp), objv[2], + if (TkGetWindowFromObj(interp, main_win, objv[2], &tkwin) != TCL_OK) { return TCL_ERROR; } |