diff --git a/src/scenes/opengl/scene_opengl.cpp b/src/scenes/opengl/scene_opengl.cpp index 560096a4ab..f3d71222cd 100644 --- a/src/scenes/opengl/scene_opengl.cpp +++ b/src/scenes/opengl/scene_opengl.cpp @@ -363,10 +363,10 @@ void SceneOpenGL::createRenderNode(Item *item, RenderContext *context) }); } } else if (auto surfaceItem = qobject_cast(item)) { - WindowQuadList quads = clipQuads(item, context); - if (!quads.isEmpty()) { - SurfacePixmap *pixmap = surfaceItem->pixmap(); - if (pixmap) { + SurfacePixmap *pixmap = surfaceItem->pixmap(); + if (pixmap) { + WindowQuadList quads = clipQuads(item, context); + if (!quads.isEmpty()) { // Don't bother with blending if the entire surface is opaque bool hasAlpha = pixmap->hasAlphaChannel() && !surfaceItem->shape().subtracted(surfaceItem->opaque()).isEmpty(); context->renderNodes.append(RenderNode{