qt: fix warning when generating RoundImage with no source

fix: #26671
This commit is contained in:
Pierre Lamot 2022-03-31 15:51:36 +02:00 committed by Jean-Baptiste Kempf
parent 5143536264
commit 0768eef6ce
1 changed files with 3 additions and 0 deletions

View File

@ -303,6 +303,9 @@ QImage RoundImage::RoundImageGenerator::execute()
if (width <= 0 || height <= 0)
return {};
if (source.isEmpty())
return {};
auto file = getReadable(source);
if (!file || !file->isOpen())
return {};