diff options
author | dkf <dkf@noemail.net> | 2012-08-27 17:44:47 (GMT) |
---|---|---|
committer | dkf <dkf@noemail.net> | 2012-08-27 17:44:47 (GMT) |
commit | 2988819dd8d2c8b6b051c06bc6901999a32dac21 (patch) | |
tree | 6d1c6cec0560b90c359e57d9771574bd24c01b09 /unix/tkUnixWm.c | |
parent | 3a9f0a01a3cf2114eddb2738c44267b88c11b668 (diff) | |
parent | 56bc915bbd0c1015ebba7bad579b60cb89340c93 (diff) | |
download | tk-2988819dd8d2c8b6b051c06bc6901999a32dac21.zip tk-2988819dd8d2c8b6b051c06bc6901999a32dac21.tar.gz tk-2988819dd8d2c8b6b051c06bc6901999a32dac21.tar.bz2 |
merge trunk
FossilOrigin-Name: b7400a9b1ad12e3e2e93ad7daaa23277aef9621f
Diffstat (limited to 'unix/tkUnixWm.c')
-rw-r--r-- | unix/tkUnixWm.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/unix/tkUnixWm.c b/unix/tkUnixWm.c index 9df3eae..3362081 100644 --- a/unix/tkUnixWm.c +++ b/unix/tkUnixWm.c @@ -6823,7 +6823,14 @@ TkSetTransientFor(Tk_Window tkwin, Tk_Window parent) if (parent == None) { parent = Tk_Parent(tkwin); while (!Tk_IsTopLevel(parent)) - parent = Tk_Parent(tkwin); + parent = Tk_Parent(parent); + } + /* + * Prevent crash due to incomplete initialization, or other problems. + * [Bugs 3554026, 3561016] + */ + if (((TkWindow *)parent)->wmInfoPtr->wrapperPtr == NULL) { + CreateWrapper(((TkWindow *)parent)->wmInfoPtr); } XSetTransientForHint(Tk_Display(tkwin), ((TkWindow *)tkwin)->wmInfoPtr->wrapperPtr->window, |