diff --git a/share/qtcreator/qml/qmlpuppet/container/imagecontainer.cpp b/share/qtcreator/qml/qmlpuppet/container/imagecontainer.cpp index 798e448108b..f36a1d5efbf 100644 --- a/share/qtcreator/qml/qmlpuppet/container/imagecontainer.cpp +++ b/share/qtcreator/qml/qmlpuppet/container/imagecontainer.cpp @@ -196,7 +196,10 @@ static void readSharedMemory(qint32 key, ImageContainer &container) QImage image = QImage(imageWidth, imageHeight, QImage::Format(imageFormat)); - std::memcpy(image.bits(), reinterpret_cast(sharedMemory.constData()) + 5, byteCount); + if (image.isNull()) + qDebug() << Q_FUNC_INFO << "Not able to create image:" << imageWidth << imageHeight << imageFormat; + else + std::memcpy(image.bits(), reinterpret_cast(sharedMemory.constData()) + 5, byteCount); container.setImage(image);