mirror of
https://github.com/tumic0/QtPBFImagePlugin.git
synced 2024-11-24 03:35:54 +01:00
Do not try to open empty filenames
(fixes warning)
This commit is contained in:
parent
54176640d0
commit
2a89ef8dfd
@ -83,6 +83,9 @@ bool Sprites::load(const QString &jsonFile, const QString &imageFile)
|
|||||||
|
|
||||||
QImage Sprites::icon(const QString &name) const
|
QImage Sprites::icon(const QString &name) const
|
||||||
{
|
{
|
||||||
|
if (_imageFile.isEmpty())
|
||||||
|
return QImage();
|
||||||
|
|
||||||
const QImage *img = atlas(_imageFile);
|
const QImage *img = atlas(_imageFile);
|
||||||
if (img->isNull())
|
if (img->isNull())
|
||||||
return QImage();
|
return QImage();
|
||||||
|
Loading…
Reference in New Issue
Block a user