diff options
author | Shawn Rutledge <shawn.rutledge@digia.com> | 2015-03-10 14:51:19 +0100 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@digia.com> | 2015-03-11 07:46:01 +0000 |
commit | 37b7c5164c830458ea833d3757ca94cb7bebcb3a (patch) | |
tree | ca1251569bcfc3726b1ca67816c1c80c93137bf2 /src/plugins | |
parent | cacae82a7000041b5347e4cfa3a7b46e064260b7 (diff) |
xcb: another QXcbScreen null pointer check
In QXcbWindow::setParent(), the window may not have a screen,
and in that case we cannot get the root window in this way.
Task-number: QTBUG-44719
Change-Id: I719e5e2f8cad13b1460b4d9df6ffd6c4a48e0d37
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/platforms/xcb/qxcbwindow.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp index e2b104e3f1..41b24e302f 100644 --- a/src/plugins/platforms/xcb/qxcbwindow.cpp +++ b/src/plugins/platforms/xcb/qxcbwindow.cpp @@ -1371,6 +1371,8 @@ void QXcbWindow::setParent(const QPlatformWindow *parent) xcb_parent_id = qXcbParent->xcb_window(); m_embedded = qXcbParent->window()->type() == Qt::ForeignWindow; } else { + if (!xcbScreen()) + return; xcb_parent_id = xcbScreen()->root(); m_embedded = false; } |