diff --git a/ChangeLog b/ChangeLog index 6d7b77a277..30fd4c338e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Tue Aug 31 12:30:36 2004 Hidetoshi NAGAI + + * ext/tcltklib/tcltklib.c (del_root): fix SEGV + Mon Aug 30 23:11:06 2004 Dave Thomas * lib/rdoc/ri/ri_driver.rb (and others): ri now merges documentation diff --git a/ext/tcltklib/tcltklib.c b/ext/tcltklib/tcltklib.c index 0217ab8feb..84a999d7e4 100644 --- a/ext/tcltklib/tcltklib.c +++ b/ext/tcltklib/tcltklib.c @@ -2781,8 +2781,13 @@ ip_thread_tkwait(self, mode, target) VALUE del_root(ip) Tcl_Interp *ip; { + Tk_Window main_win; + 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); return Qnil; }