diff options
-rw-r--r-- | src/mtexturepixmapitem_glx.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/mtexturepixmapitem_glx.cpp b/src/mtexturepixmapitem_glx.cpp index 2d8b549..715487e 100644 --- a/src/mtexturepixmapitem_glx.cpp +++ b/src/mtexturepixmapitem_glx.cpp @@ -84,10 +84,13 @@ static bool hasTextureFromPixmap() void MTexturePixmapItem::init() { - if (attrs->map_state != IsViewable) { - qWarning("MTexturePixmapItem::init(): Failed getting offscreen pixmap"); + if (isValid() && (windowAttributes()->map_state != IsViewable)) { + qWarning("MTexturePixmapItem::%s(): Failed getting offscreen pixmap", + __func__); + d->setValid(false); + return; + } else if (!isValid()) return; - } d->glpixmap = 0; saveBackingStore(); |