diff options
Diffstat (limited to 'src/compositor/compositor_api')
-rw-r--r-- | src/compositor/compositor_api/waylandsurfacenode.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/compositor/compositor_api/waylandsurfacenode.cpp b/src/compositor/compositor_api/waylandsurfacenode.cpp index e6571751c..a4063ccb4 100644 --- a/src/compositor/compositor_api/waylandsurfacenode.cpp +++ b/src/compositor/compositor_api/waylandsurfacenode.cpp @@ -39,10 +39,12 @@ void WaylandSurfaceNode::preprocess() { QMutexLocker locker(WaylandSurfaceItem::mutex); - //Update if the item is dirty and we haven't done an updateTexture for this frame - if (m_item && m_item->m_damaged && !m_textureUpdated) { - m_item->updateTexture(); - updateTexture(); + if (m_item && m_item->surface()) { + //Update if the item is dirty and we haven't done an updateTexture for this frame + if (m_item->m_damaged && !m_textureUpdated) { + m_item->updateTexture(); + updateTexture(); + } } //Reset value for next frame: we have not done updatePaintNode yet m_textureUpdated = false; |