diff options
author | Johan Klokkhammer Helsing <johan.helsing@qt.io> | 2019-11-01 11:24:26 +0100 |
---|---|---|
committer | Johan Helsing <johan.helsing@qt.io> | 2019-11-04 13:40:56 +0000 |
commit | 962b9be7992cef672cb6307af5653c97382c334f (patch) | |
tree | 7c26193b48b5b8a97683f988aec247df446d51ac /src/client/qwaylanddisplay.cpp | |
parent | e7c9adccf89ed13dd2a693bf0555062729a624e8 (diff) |
Client: Fix crash when showing a child window with a hidden parent
[ChangeLog][QPA plugin] Fixed a crash when showing a window with a hidden
parent.
Now we just avoid creating the subsurface, so nothing is shown. Seems to be
the same behavior as on xcb.
Fixes: QTBUG-79674
Change-Id: Ia46fcd9a0da5aad4704816a41515cb1e128ac65f
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Diffstat (limited to 'src/client/qwaylanddisplay.cpp')
-rw-r--r-- | src/client/qwaylanddisplay.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/client/qwaylanddisplay.cpp b/src/client/qwaylanddisplay.cpp index 78524f6fc..27e38ccf7 100644 --- a/src/client/qwaylanddisplay.cpp +++ b/src/client/qwaylanddisplay.cpp @@ -109,6 +109,10 @@ struct ::wl_region *QWaylandDisplay::createRegion(const QRegion &qregion) return nullptr; } + // Make sure we don't pass NULL surfaces to libwayland (crashes) + Q_ASSERT(parent->object()); + Q_ASSERT(window->object()); + return mSubCompositor->get_subsurface(window->object(), parent->object()); } |