Commit 1d2424a5 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
parent a5c55b68
Pipeline #159813 passed with stage
in 6 minutes and 56 seconds
......@@ -690,7 +690,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