diff --git a/src/platformsupport/scenes/opengl/basiceglsurfacetexture_wayland.cpp b/src/platformsupport/scenes/opengl/basiceglsurfacetexture_wayland.cpp index 022626cda7..d22474702e 100644 --- a/src/platformsupport/scenes/opengl/basiceglsurfacetexture_wayland.cpp +++ b/src/platformsupport/scenes/opengl/basiceglsurfacetexture_wayland.cpp @@ -66,7 +66,7 @@ void BasicEGLSurfaceTextureWayland::update(const QRegion ®ion) bool BasicEGLSurfaceTextureWayland::loadShmTexture(GraphicsBuffer *buffer) { const GraphicsBufferView view(buffer); - if (Q_UNLIKELY(!view.image())) { + if (Q_UNLIKELY(view.isNull())) { return false; } @@ -95,7 +95,7 @@ void BasicEGLSurfaceTextureWayland::updateShmTexture(GraphicsBuffer *buffer, con } const GraphicsBufferView view(buffer); - if (Q_UNLIKELY(!view.image())) { + if (Q_UNLIKELY(view.isNull())) { return; } diff --git a/src/platformsupport/scenes/qpainter/qpaintersurfacetexture_wayland.cpp b/src/platformsupport/scenes/qpainter/qpaintersurfacetexture_wayland.cpp index 245b58a67e..14fb6b440d 100644 --- a/src/platformsupport/scenes/qpainter/qpaintersurfacetexture_wayland.cpp +++ b/src/platformsupport/scenes/qpainter/qpaintersurfacetexture_wayland.cpp @@ -21,7 +21,7 @@ QPainterSurfaceTextureWayland::QPainterSurfaceTextureWayland(QPainterBackend *ba bool QPainterSurfaceTextureWayland::create() { const GraphicsBufferView view(m_pixmap->buffer()); - if (Q_LIKELY(view.image())) { + if (Q_LIKELY(!view.isNull())) { // The buffer data is copied as the buffer interface returns a QImage // which doesn't own the data of the underlying wl_shm_buffer object. m_image = view.image()->copy(); @@ -32,7 +32,7 @@ bool QPainterSurfaceTextureWayland::create() void QPainterSurfaceTextureWayland::update(const QRegion ®ion) { const GraphicsBufferView view(m_pixmap->buffer()); - if (Q_UNLIKELY(!view.image())) { + if (Q_UNLIKELY(view.isNull())) { return; } diff --git a/src/shadow.cpp b/src/shadow.cpp index 36b13a526d..41f053c166 100644 --- a/src/shadow.cpp +++ b/src/shadow.cpp @@ -214,8 +214,8 @@ static QImage shadowTileForBuffer(GraphicsBuffer *buffer) { if (buffer) { const GraphicsBufferView view(buffer); - if (const QImage *image = view.image()) { - return image->copy(); + if (!view.isNull()) { + return view.image()->copy(); } } return QImage();