Don't set plugin state to PS_BROKEN due to load failures

develop
lethosor 2015-08-16 17:02:53 -04:00
parent a5f15b279c
commit 5717c2cdd4
1 changed files with 1 additions and 2 deletions

@ -260,7 +260,7 @@ bool Plugin::load(color_ostream &con)
{ {
con.printerr("Can't load plugin %s\n", name.c_str()); con.printerr("Can't load plugin %s\n", name.c_str());
RefAutolock lock(access); RefAutolock lock(access);
state = PS_BROKEN; state = PS_UNLOADED;
return false; return false;
} }
#define plugin_abort_load ClosePlugin(plug); RefAutolock lock(access); state = PS_UNLOADED #define plugin_abort_load ClosePlugin(plug); RefAutolock lock(access); state = PS_UNLOADED
@ -361,7 +361,6 @@ bool Plugin::load(color_ostream &con)
plugin_onupdate = 0; plugin_onupdate = 0;
reset_lua(); reset_lua();
plugin_abort_load; plugin_abort_load;
state = PS_BROKEN;
return false; return false;
} }
} }