diff options
author | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-08-31 03:32:33 +0000 |
---|---|---|
committer | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-08-31 03:32:33 +0000 |
commit | c8fa16c81546e8994e39e283c1b5c0c92afff209 (patch) | |
tree | b358dafb9b82d516de00edc33e18f75d3946c90a | |
parent | 2ad8cb54289d5bf069d307272869422c429d90b3 (diff) |
* ext/tcltklib/tcltklib.c (del_root): fix SEGV
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6840 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | ext/tcltklib/tcltklib.c | 7 |
2 files changed, 10 insertions, 1 deletions
@@ -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 23:11:06 2004 Dave Thomas <dave@pragprog.com> * 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; } |