From 7e44e9e88503e8cd1d18e91c37203991640e7d16 Mon Sep 17 00:00:00 2001 From: cncfanatics Date: Mon, 16 Aug 2010 15:37:49 +0200 Subject: [PATCH] Add a check and only try and load images that actualy exist --- gui/bitmapLoader.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gui/bitmapLoader.py b/gui/bitmapLoader.py index 83c56847f..60e267605 100644 --- a/gui/bitmapLoader.py +++ b/gui/bitmapLoader.py @@ -36,4 +36,5 @@ def getBitmap(name,location): location = os.path.join(config.path, location) path = os.path.join(location, name + ".png") - return wx.Image(path).ConvertToBitmap() + if os.path.exists(path): + return wx.Image(path).ConvertToBitmap()