Do not try to open empty filenames

(fixes warning)
This commit is contained in:
Martin Tůma 2018-12-22 08:17:24 +01:00
parent 54176640d0
commit 2a89ef8dfd

View File

@ -83,6 +83,9 @@ bool Sprites::load(const QString &jsonFile, const QString &imageFile)
QImage Sprites::icon(const QString &name) const
{
if (_imageFile.isEmpty())
return QImage();
const QImage *img = atlas(_imageFile);
if (img->isNull())
return QImage();