* ext/tcltklib/tcltklib.c (del_root): fix SEGV

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6840 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nagai 2004-08-31 03:32:33 +00:00
parent f7b9018390
commit ec76306b0a
2 changed files with 10 additions and 1 deletions

View File

@ -1,3 +1,7 @@
Tue Aug 31 12:30:36 2004 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
* ext/tcltklib/tcltklib.c (del_root): fix SEGV
Mon Aug 30 21:50:14 2004 Dave Thomas <dave@pragprog.com> Mon Aug 30 21:50:14 2004 Dave Thomas <dave@pragprog.com>
* object.c: Add RDoc for Module.included. * object.c: Add RDoc for Module.included.

View File

@ -2781,8 +2781,13 @@ ip_thread_tkwait(self, mode, target)
VALUE del_root(ip) VALUE del_root(ip)
Tcl_Interp *ip; Tcl_Interp *ip;
{ {
Tk_Window main_win;
Tcl_Preserve(ip); Tcl_Preserve(ip);
Tk_DestroyWindow(Tk_MainWindow(ip)); main_win = Tk_MainWindow(ip);
if (main_win != (Tk_Window)NULL) {
Tk_DestroyWindow(main_win);
}
Tcl_Release(ip); Tcl_Release(ip);
return Qnil; return Qnil;
} }