Skip to content

Commit

Permalink
[skip ci] when converting from SoSFImage to QImage check that the int…
Browse files Browse the repository at this point in the history
…ernal buffer is not null
  • Loading branch information
wwmayer committed Dec 9, 2019
1 parent 09cd151 commit 3490adf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Gui/BitmapFactory.cpp
Expand Up @@ -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];
Expand Down

0 comments on commit 3490adf

Please sign in to comment.