summaryrefslogtreecommitdiffstats
path: root/unix/tkUnixWm.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2012-08-27 17:44:47 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2012-08-27 17:44:47 (GMT)
commit06927ad3539a75bf8b123fca6c254bf2e56b5dd5 (patch)
tree6d1c6cec0560b90c359e57d9771574bd24c01b09 /unix/tkUnixWm.c
parent64afbee9e478bc945db2f93ea2eabe8bc49439ee (diff)
parentabe795d8463891270f64f05b7ffb36988d0952b9 (diff)
downloadtk-06927ad3539a75bf8b123fca6c254bf2e56b5dd5.zip
tk-06927ad3539a75bf8b123fca6c254bf2e56b5dd5.tar.gz
tk-06927ad3539a75bf8b123fca6c254bf2e56b5dd5.tar.bz2
merge trunk
Diffstat (limited to 'unix/tkUnixWm.c')
-rw-r--r--unix/tkUnixWm.c9
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,