diff --git a/src/plugins/scenes/opengl/scene_opengl.cpp b/src/plugins/scenes/opengl/scene_opengl.cpp index cdfb570241..43be7805a5 100644 --- a/src/plugins/scenes/opengl/scene_opengl.cpp +++ b/src/plugins/scenes/opengl/scene_opengl.cpp @@ -1570,11 +1570,13 @@ void OpenGLWindow::performPaint(int mask, const QRegion ®ion, const WindowPai QSharedPointer OpenGLWindow::windowTexture() { OpenGLWindowPixmap *frame = nullptr; - if (surfaceItem()) { - frame = static_cast(surfaceItem()->windowPixmap()); + const SurfaceItem *item = surfaceItem(); + + if (item) { + frame = static_cast(item->windowPixmap()); } - if (frame && frame->children().isEmpty()) { + if (frame && item->childItems().isEmpty()) { return QSharedPointer(new GLTexture(*frame->texture())); } else { auto effectWindow = window()->effectWindow();