Test for null pointer before using it
Task-number: QTBUG-66867 Change-Id: Ibbe407fa3ac32141b52fa0086e9f1ebfd27052ba Done-with: Fabian Vogt <fvogt@suse.de> Reviewed-by: Johan Helsing <johan.helsing@qt.io> Reviewed-by: Jan Grulich <jgrulich@redhat.com>
This commit is contained in:
parent
2d468ebfa5
commit
5f32a06c28
@ -785,7 +785,7 @@ static QWaylandWindow *closestShellSurfaceWindow(QWindow *window)
|
||||
{
|
||||
while (window) {
|
||||
auto w = static_cast<QWaylandWindow *>(window->handle());
|
||||
if (w->shellSurface())
|
||||
if (w && w->shellSurface())
|
||||
return w;
|
||||
window = window->transientParent() ? window->transientParent() : window->parent();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user