diff --git a/library/Core.cpp b/library/Core.cpp index 71c92afea..a61fef4e9 100644 --- a/library/Core.cpp +++ b/library/Core.cpp @@ -1225,6 +1225,7 @@ int Core::Shutdown ( void ) if(errorstate) return true; errorstate = 1; + CoreSuspendClaimer suspend; if(plug_mgr) { delete plug_mgr; diff --git a/library/PluginManager.cpp b/library/PluginManager.cpp index 3c015b2a7..d8b9ff27d 100644 --- a/library/PluginManager.cpp +++ b/library/PluginManager.cpp @@ -195,6 +195,9 @@ bool Plugin::load(color_ostream &con) { return true; } + // enter suspend + CoreSuspender suspend; + // open the library, etc DFLibrary * plug = OpenPlugin(filename.c_str()); if(!plug) { @@ -270,6 +273,8 @@ bool Plugin::unload(color_ostream &con) } // wait for all calls to finish access->wait(); + // enter suspend + CoreSuspender suspend; // notify plugin about shutdown, if it has a shutdown function command_result cr = CR_OK; if(plugin_shutdown)