diff --git a/Arma3ObjectBuilder/__init__.py b/Arma3ObjectBuilder/__init__.py index 6f91f8b..355f05f 100644 --- a/Arma3ObjectBuilder/__init__.py +++ b/Arma3ObjectBuilder/__init__.py @@ -33,14 +33,13 @@ addon_dir = os.path.abspath(os.path.dirname(os.path.realpath(__file__))) addon_icons = {} + def get_icon(name): - icon = 0 try: - icon = addon_icons[addon_prefs.icon_theme.lower()][name].icon_id + return addon_icons[addon_prefs.icon_theme.lower()][name].icon_id except Exception: - pass + return 0 - return icon def get_prefs(): return addon_prefs