diff options
author | dgp@users.sourceforge.net <dgp> | 2012-08-23 21:42:51 (GMT) |
---|---|---|
committer | dgp@users.sourceforge.net <dgp> | 2012-08-23 21:42:51 (GMT) |
commit | 320e538ec4117f4607d76d513e003758c952c9f9 (patch) | |
tree | 1b2880cd4325f320f1eea8275306468ba4ea32f9 /unix | |
parent | 22c5cb1beef8515c73e958d0c444888cca47d5df (diff) | |
parent | 6de2bc6dff9d1a3b5f888c353bf6cb1912e2354b (diff) | |
download | tk-320e538ec4117f4607d76d513e003758c952c9f9.zip tk-320e538ec4117f4607d76d513e003758c952c9f9.tar.gz tk-320e538ec4117f4607d76d513e003758c952c9f9.tar.bz2 |
3554026,3561016 Stop crash with tearoff menus
Diffstat (limited to 'unix')
-rw-r--r-- | unix/tkUnixWm.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/unix/tkUnixWm.c b/unix/tkUnixWm.c index 09cd08d..60aaceb 100644 --- a/unix/tkUnixWm.c +++ b/unix/tkUnixWm.c @@ -6759,6 +6759,13 @@ TkSetTransientFor(Tk_Window tkwin, Tk_Window parent) while (!Tk_IsTopLevel(parent)) parent = Tk_Parent(tkwin); } + /* + * Prevent crash due to incomplete initialization, or other problems. + * [Bugs 3554026, 3561016] + */ + if (((TkWindow *)parent)->wmInfoPtr->wrapperPtr == NULL) { + return; + } XSetTransientForHint(Tk_Display(tkwin), ((TkWindow *)tkwin)->wmInfoPtr->wrapperPtr->window, ((TkWindow *)parent)->wmInfoPtr->wrapperPtr->window); |