Need to NULL check for parent() in parentSurface()
authorElvis Lee <kwangwoong.lee@lge.com>
Fri, 10 Aug 2012 05:52:30 +0000 (14:52 +0900)
committerLaszlo Agocs <laszlo.p.agocs@nokia.com>
Fri, 10 Aug 2012 07:43:46 +0000 (09:43 +0200)
Change-Id: I7252a616e8243074cfba8a473869fb91f84a60a6
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
src/compositor/compositor_api/waylandsurface.cpp

index 69eb9d6..9aa6c28 100644 (file)
@@ -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;