From 3490adf7dac3df2b39f06b03fc134b8497cba035 Mon Sep 17 00:00:00 2001 From: wmayer Date: Mon, 9 Dec 2019 17:44:02 +0100 Subject: [PATCH] [skip ci] when converting from SoSFImage to QImage check that the internal buffer is not null --- src/Gui/BitmapFactory.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Gui/BitmapFactory.cpp b/src/Gui/BitmapFactory.cpp index 3878b6727601..3fbfbf84a354 100644 --- a/src/Gui/BitmapFactory.cpp +++ b/src/Gui/BitmapFactory.cpp @@ -693,6 +693,8 @@ void BitmapFactoryInst::convert(const SoSFImage& p, QImage& img) const int numcomponents; const unsigned char * bytes = p.getValue(size, numcomponents); + if (!bytes) + return; int width = (int)size[0]; int height = (int)size[1];