forked from qt-creator/qt-creator
QmlDesigner: Crash fix
This is likely to fix a crash we could only reproduce with the Qt Design Studio release on one machine. Task-number: QDS-270 Change-Id: Idc33ba145169613b866903fa5e259f8cd6ec4ee8 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -196,6 +196,9 @@ static void readSharedMemory(qint32 key, ImageContainer &container)
|
||||
|
||||
QImage image = QImage(imageWidth, imageHeight, QImage::Format(imageFormat));
|
||||
|
||||
if (image.isNull())
|
||||
qDebug() << Q_FUNC_INFO << "Not able to create image:" << imageWidth << imageHeight << imageFormat;
|
||||
else
|
||||
std::memcpy(image.bits(), reinterpret_cast<const qint32*>(sharedMemory.constData()) + 5, byteCount);
|
||||
|
||||
container.setImage(image);
|
||||
|
Reference in New Issue
Block a user