Verify that windowPixmap<>() does not return a nullptr before accessing the children
windowPixmap() is allowed to return a nullptr, thus we need to verify that the returned pointer is not null. If it is null it's the same as if there are no child WindowPixmaps.
This commit is contained in:
parent
a1f21f3cea
commit
c211268b35
1 changed files with 2 additions and 1 deletions
|
@ -1646,7 +1646,8 @@ void SceneOpenGL2Window::performPaint(int mask, QRegion region, WindowPaintData
|
|||
setBlendEnabled(false);
|
||||
|
||||
// render sub-surfaces
|
||||
const auto &children = windowPixmap<OpenGLWindowPixmap>()->children();
|
||||
auto wp = windowPixmap<OpenGLWindowPixmap>();
|
||||
const auto &children = wp ? wp->children() : QVector<WindowPixmap*>();
|
||||
windowMatrix.translate(toplevel->clientPos().x(), toplevel->clientPos().y());
|
||||
for (auto pixmap : children) {
|
||||
if (pixmap->subSurface().isNull() || pixmap->subSurface()->surface().isNull() || !pixmap->subSurface()->surface()->isMapped()) {
|
||||
|
|
Loading…
Reference in a new issue