Fix Qt screenhot crash (#889)

This commit is contained in:
Murat Seker
2020-07-22 16:46:43 +02:00
committed by GitHub
parent 126c18e003
commit 21b0b3f2ea
3 changed files with 7 additions and 2 deletions

View File

@@ -136,7 +136,9 @@ public:
void toRgb(ImageData<ColorRgb>& image)
{
image.resize(_width, _height);
if (image.width() != _width || image.height() != _height)
image.resize(_width, _height);
const unsigned imageSize = _width * _height;
for (unsigned idx = 0; idx < imageSize; idx++)