From fa1e44c42e0f9b40a135d35f619cc45473053718 Mon Sep 17 00:00:00 2001 From: HomeWorld Date: Tue, 25 Oct 2011 21:40:06 +0300 Subject: [PATCH] Return a 16x16 empty bitmap (bitmap loader) if we got an error (missing icon or other WTF cases) --- gui/bitmapLoader.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gui/bitmapLoader.py b/gui/bitmapLoader.py index fb1139f57..e24ed3d34 100644 --- a/gui/bitmapLoader.py +++ b/gui/bitmapLoader.py @@ -69,6 +69,9 @@ def getBitmap(name,location): bmp = cachedBitmaps[path] # print "#BMPs:%d - Current took: %.8f" % (cachedBitmapsCount,time.clock() - start) + if bmp is None: + bmp = wx.EmptyBitmap(16,16) + return bmp def getImage(name, location):