GUI: Fix missing GraphicsWidget gfx in some cases

This commit is contained in:
Eugene Sandulenko 2021-03-29 13:42:28 +02:00
parent 0b25368f7c
commit 3df69113f3

View file

@ -862,7 +862,7 @@ void GraphicsWidget::setGfx(const Graphics::Surface *gfx) {
return;
}
if (_w != gfx->w || _h != gfx->h) {
if ((_w != gfx->w || _h != gfx->h) && _w && _h) {
Graphics::Surface *tmp = scaleGfx(gfx, _w, _h);
_gfx.copyFrom(*tmp);
tmp->free();