summaryrefslogtreecommitdiffstats
path: root/ext/tk/tcltklib.c
diff options
context:
space:
mode:
authornagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-04-11 11:14:33 +0000
committernagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-04-11 11:14:33 +0000
commit3b0dd0f16fa8ad6496b90430bd98cfde3f8808a0 (patch)
treeb639b1a0fcb17fdcd8bb7623c364eca2b041b07b /ext/tk/tcltklib.c
parent04021e04d4bc9d7069f5a23286f6c8bd58104e2c (diff)
downloadruby-3b0dd0f16fa8ad6496b90430bd98cfde3f8808a0.tar.gz
ruby-3b0dd0f16fa8ad6496b90430bd98cfde3f8808a0.tar.xz
ruby-3b0dd0f16fa8ad6496b90430bd98cfde3f8808a0.zip
* ext/tk/tcltklib.c (ip_finalize): adhoc patch to avoid SEGV when exit
on Tcl/Tk8.3.x. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@8303 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tk/tcltklib.c')
-rw-r--r--ext/tk/tcltklib.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/tk/tcltklib.c b/ext/tk/tcltklib.c
index 1a00c7e75..21c9d904c 100644
--- a/ext/tk/tcltklib.c
+++ b/ext/tk/tcltklib.c
@@ -4365,7 +4365,7 @@ delete_slaves(ip)
ip_finalize(slave);
Tcl_DeleteInterp(slave);
- Tcl_Release(slave);
+ /* Tcl_Release(slave); */
}
}
@@ -4407,7 +4407,7 @@ ip_finalize(ip)
delete_slaves(ip);
/* delete root widget */
- Tcl_GlobalEval(ip, "destroy .");
+ Tcl_GlobalEval(ip, "catch {destroy .}");
/* call finalize-hook-proc */
if (Tcl_GetCommandInfo(ip, finalize_hook_name, &info)) {
@@ -4415,8 +4415,8 @@ ip_finalize(ip)
Tcl_GlobalEval(ip, finalize_hook_name);
}
- DUMP1("call cancel aftern scripts");
- Tcl_GlobalEval(ip, "foreach id [after info] {after cancel $id}");
+ DUMP1("cancel after scripts");
+ Tcl_GlobalEval(ip, "catch {foreach id [after info] {after cancel $id}}");
Tcl_Release(ip);