diff options
| author | Alexander Gavrilov | 2012-03-28 18:47:03 +0400 |
|---|---|---|
| committer | Alexander Gavrilov | 2012-03-28 18:47:03 +0400 |
| commit | e4e643f9d2d916450b7fafe320f5a5d451130a5c (patch) | |
| tree | 480fa916802930686b557246d585dbd1ed2fd8ae /library/PluginManager.cpp | |
| parent | b7ff7681acbb97030abc0164f85a9a9f40f31c2a (diff) | |
| download | dfhack-e4e643f9d2d916450b7fafe320f5a5d451130a5c.tar.gz dfhack-e4e643f9d2d916450b7fafe320f5a5d451130a5c.tar.bz2 dfhack-e4e643f9d2d916450b7fafe320f5a5d451130a5c.tar.xz | |
Clear the command vector during plugin load and unload to avoid confusion.
Diffstat (limited to 'library/PluginManager.cpp')
| -rw-r--r-- | library/PluginManager.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/library/PluginManager.cpp b/library/PluginManager.cpp index 565a0c2a..a7faabee 100644 --- a/library/PluginManager.cpp +++ b/library/PluginManager.cpp @@ -212,6 +212,7 @@ bool Plugin::load(color_ostream &con) plugin_rpcconnect = (RPCService* (*)(color_ostream &)) LookupPlugin(plug, "plugin_rpcconnect"); this->name = *plug_name; plugin_lib = plug; + commands.clear(); if(plugin_init(con,commands) == CR_OK) { state = PS_LOADED; @@ -242,6 +243,7 @@ bool Plugin::unload(color_ostream &con) access->wait(); // cleanup... parent->unregisterCommands(this); + commands.clear(); if(cr == CR_OK) { ClosePlugin(plugin_lib); |
