summaryrefslogtreecommitdiffstats
path: root/generic/tkWindow.c
diff options
context:
space:
mode:
authorericm <ericm>2000-03-07 00:09:07 (GMT)
committerericm <ericm>2000-03-07 00:09:07 (GMT)
commit253dd7f8bf575cf34521d18f43cc9841c06a747e (patch)
tree07a51fc9e31844cac5790d26a696410910bd3886 /generic/tkWindow.c
parent3b521e25ec85d49456bf38f1cb07e915b814bff4 (diff)
downloadtk-253dd7f8bf575cf34521d18f43cc9841c06a747e.zip
tk-253dd7f8bf575cf34521d18f43cc9841c06a747e.tar.gz
tk-253dd7f8bf575cf34521d18f43cc9841c06a747e.tar.bz2
* generic/tkOldConfig.c: Added check for NULL tkwin value in
Tk_ConfigureWidget [Bug: 4079] * generic/tkWindow.c: Added check for NULL tkwin value in Tk_NameToWindow [Bug: 4079]
Diffstat (limited to 'generic/tkWindow.c')
-rw-r--r--generic/tkWindow.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/generic/tkWindow.c b/generic/tkWindow.c
index bc088f9..04dc7ee 100644
--- a/generic/tkWindow.c
+++ b/generic/tkWindow.c
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkWindow.c,v 1.14 1999/12/16 21:57:36 hobbs Exp $
+ * RCS: @(#) $Id: tkWindow.c,v 1.15 2000/03/07 00:09:09 ericm Exp $
*/
#include "tkPort.h"
@@ -2109,6 +2109,15 @@ Tk_NameToWindow(interp, pathName, tkwin)
{
Tcl_HashEntry *hPtr;
+ if (tkwin == NULL) {
+ /*
+ * Either we're not really in Tk, or the main window was destroyed and
+ * we're on our way out of the application
+ */
+ Tcl_AppendResult(interp, "NULL main window", (char *)NULL);
+ return NULL;
+ }
+
hPtr = Tcl_FindHashEntry(&((TkWindow *) tkwin)->mainPtr->nameTable,
pathName);
if (hPtr == NULL) {