Check to make sure the bitmap exists before converting to image.
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user