mirror of
https://github.com/mupen64plus/mupen64plus-ui-python.git
synced 2025-04-02 10:51:53 -04:00
Don't crash if plugin is missing, this should fix #106
This commit is contained in:
parent
01f7edc94f
commit
f617b4b0be
1 changed files with 12 additions and 2 deletions
|
@ -248,10 +248,15 @@ class Core:
|
|||
self.plugins = plugins
|
||||
for plugin_type in PLUGIN_ORDER:
|
||||
plugin = self.plugins[plugin_type]
|
||||
|
||||
if not plugin:
|
||||
plugin_map = list(self.plugin_map[plugin_type].values())[0]
|
||||
else:
|
||||
plugin_map = self.plugin_map[plugin_type][plugin]
|
||||
try:
|
||||
plugin_map = self.plugin_map[plugin_type][plugin]
|
||||
except KeyError:
|
||||
continue
|
||||
|
||||
(plugin_handle, plugin_path, plugin_name,
|
||||
plugin_desc, plugin_version) = plugin_map
|
||||
|
||||
|
@ -271,10 +276,15 @@ class Core:
|
|||
and re-attaches the 'dummy' plugin functions."""
|
||||
for plugin_type in PLUGIN_ORDER:
|
||||
plugin = self.plugins[plugin_type]
|
||||
|
||||
if not plugin:
|
||||
plugin_map = list(self.plugin_map[plugin_type].values())[0]
|
||||
else:
|
||||
plugin_map = self.plugin_map[plugin_type][plugin]
|
||||
try:
|
||||
plugin_map = self.plugin_map[plugin_type][plugin]
|
||||
except KeyError:
|
||||
continue
|
||||
|
||||
(plugin_handle, plugin_path, plugin_name,
|
||||
plugin_desc, plugin_version) = plugin_map
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue