Merge pull request #1768 from pyfa-org/issue/1767

Check to make sure the bitmap exists before converting to image.
This commit is contained in:
Ryan Holmes
2018-10-12 23:59:22 -04:00
committed by GitHub

View File

@@ -73,7 +73,11 @@ class BitmapLoader(object):
@classmethod
def getImage(cls, name, location):
return cls.getBitmap(name, location).ConvertToImage()
bmp = cls.getBitmap(name, location)
if bmp is not None:
return bmp.ConvertToImage()
else:
return None
@classmethod
def loadBitmap(cls, name, location):