Commit 6dcf73ad authored by David Edmundson's avatar David Edmundson
Browse files

Guard subsurface parent access.

Whilst a subsurface must have a parent at the time of creation, the
lifespan is not guaranteed afterwards.

It's a weird thing for a client to do, but we need to not crash

If the parent surface is destroyed we should consider the surface

BUG: 452044

(cherry picked from commit 1d2424a5)
parent 97df88c6
Pipeline #160717 passed with stage
in 5 minutes and 19 seconds
......@@ -678,7 +678,13 @@ void SurfaceInterfacePrivate::commitFromCache()
bool SurfaceInterfacePrivate::computeEffectiveMapped() const
return bufferRef && (!subSurface || subSurface->parentSurface()->isMapped());
if (!bufferRef) {
return false;
if (subSurface) {
return subSurface->parentSurface() && subSurface->parentSurface()->isMapped();
return true;
void SurfaceInterfacePrivate::updateEffectiveMapped()
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