diff options
-rw-r--r-- | src/compositor/compositor_api/waylandsurface.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compositor/compositor_api/waylandsurface.cpp b/src/compositor/compositor_api/waylandsurface.cpp index 69eb9d61..9aa6c280 100644 --- a/src/compositor/compositor_api/waylandsurface.cpp +++ b/src/compositor/compositor_api/waylandsurface.cpp @@ -97,7 +97,7 @@ WaylandClient *WaylandSurface::client() const WaylandSurface *WaylandSurface::parentSurface() const { Q_D(const WaylandSurface); - if (d->surface->subSurface()) { + if (d->surface->subSurface() && d->surface->subSurface()->parent()) { return d->surface->subSurface()->parent()->waylandSurface(); } return 0; |