summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2006-06-09 15:40:58 (GMT)
committerdgp <dgp@users.sourceforge.net>2006-06-09 15:40:58 (GMT)
commitd7b0d0af547943f11f02255a54433c9d702adc0b (patch)
tree4631c2aab6c802366639445b9fdaf5eff74b05f5
parent2a0db87764a4b70fd8dff0002bd2cdf63a4751a5 (diff)
downloadtk-d7b0d0af547943f11f02255a54433c9d702adc0b.zip
tk-d7b0d0af547943f11f02255a54433c9d702adc0b.tar.gz
tk-d7b0d0af547943f11f02255a54433c9d702adc0b.tar.bz2
* generic/tkMain.c: Added Tcl_Preserve() call on the master
interp as crash protection against any Tcl_DeleteInterp() call that might happen.
-rw-r--r--ChangeLog6
-rw-r--r--generic/tkMain.c4
2 files changed, 9 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 67b05fc..efc1ce8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2006-06-09 Don Porter <dgp@users.sourceforge.net>
+
+ * generic/tkMain.c: Added Tcl_Preserve() call on the master
+ interp as crash protection against any Tcl_DeleteInterp() call
+ that might happen.
+
2006-06-01 Don Porter <dgp@users.sourceforge.net>
* generic/tkConsole.c: Added Tcl_RegisterChannel() calls to bump
diff --git a/generic/tkMain.c b/generic/tkMain.c
index 9def321..58f7320 100644
--- a/generic/tkMain.c
+++ b/generic/tkMain.c
@@ -13,7 +13,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMain.c,v 1.20 2005/12/12 22:33:27 dkf Exp $
+ * RCS: @(#) $Id: tkMain.c,v 1.21 2006/06/09 15:40:58 dgp Exp $
*/
#include <ctype.h>
@@ -121,6 +121,7 @@ Tk_MainEx(
Tcl_FindExecutable(argv[0]);
tsdPtr->interp = interp;
+ Tcl_Preserve((ClientData) interp);
#if defined(__WIN32__)
Tk_InitConsoleChannels(interp);
@@ -307,6 +308,7 @@ Tk_MainEx(
Tk_MainLoop();
Tcl_DeleteInterp(interp);
+ Tcl_Release((ClientData) interp);
Tcl_SetStartupScript(NULL, NULL);
Tcl_Exit(0);
}