Commit e47474cf authored by Giulio Camuffo's avatar Giulio Camuffo
Browse files

Don't access a dangling pointer


The surface's resource may have been destroyed, return a null client
in that case.

Change-Id: I3d7e0f0e94008e003e43f1987e6560dd73f5c5db
Reviewed-by: default avatarLaszlo Agocs <laszlo.agocs@digia.com>
Showing with 2 additions and 0 deletions
...@@ -92,6 +92,8 @@ QWaylandSurface::~QWaylandSurface() ...@@ -92,6 +92,8 @@ QWaylandSurface::~QWaylandSurface()
WaylandClient *QWaylandSurface::client() const WaylandClient *QWaylandSurface::client() const
{ {
Q_D(const QWaylandSurface); Q_D(const QWaylandSurface);
if (d->isDestroyed())
return Q_NULLPTR;
return d->resource()->client(); return d->resource()->client();
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment