If SurfaceItem does not have a pixmap, return an empty WindowQuadList
Otherwise the caller needs to ensure that we're not calling on an item without pixmap and if we don't, things crash.
This commit is contained in:
parent
bb7f627acc
commit
85d46016a2
1 changed files with 4 additions and 0 deletions
|
@ -127,6 +127,10 @@ void SurfaceItem::preprocess()
|
|||
|
||||
WindowQuadList SurfaceItem::buildQuads() const
|
||||
{
|
||||
if (!pixmap()) {
|
||||
return {};
|
||||
}
|
||||
|
||||
const QRegion region = shape();
|
||||
const auto size = pixmap()->size();
|
||||
|
||||
|
|
Loading…
Reference in a new issue