summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@digia.com>2013-04-30 10:59:15 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-04-30 12:45:30 +0200
commit124da0f5e6733b0f9f87367306c6d7c0b9513685 (patch)
tree36503d5cb81b221236c114eefb726b6153994334 /src/plugins/platforms
parentdc5a579a163f53fc7ae443fb2b9eef8c4edd66fa (diff)
Fix possible segfault when setting up window's transient parent
tp->handle() can be null. Task-number: QTBUG-30919 Change-Id: Ie18b70d4cc6916d2e821a71d00d1bf99956b0632 Reviewed-by: Liang Qi <liang.qi@digia.com>
Diffstat (limited to 'src/plugins/platforms')
-rw-r--r--src/plugins/platforms/xcb/qxcbwindow.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp
index c845b875bf..6291396e6e 100644
--- a/src/plugins/platforms/xcb/qxcbwindow.cpp
+++ b/src/plugins/platforms/xcb/qxcbwindow.cpp
@@ -630,7 +630,7 @@ void QXcbWindow::show()
const QWindow *tp = window()->transientParent();
if (isTransient(window()) || tp != 0) {
xcb_window_t transientXcbParent = 0;
- if (tp)
+ if (tp && tp->handle())
transientXcbParent = static_cast<const QXcbWindow *>(tp->handle())->winId();
// Default to client leader if there is no transient parent, else modal dialogs can
// be hidden by their parents.