diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/plugincontainer.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/plugincontainer.cpp b/src/plugincontainer.cpp index a2f0d5f0..c3d66913 100644 --- a/src/plugincontainer.cpp +++ b/src/plugincontainer.cpp @@ -850,6 +850,11 @@ void PluginContainer::loadPlugin(QString const& filepath) void PluginContainer::unloadPlugin(MOBase::IPlugin* plugin, QObject* object)
{
if (auto* game = qobject_cast<IPluginGame*>(object)) {
+
+ if (game == managedGame()) {
+ throw Exception("cannot unload the plugin for the currently managed game");
+ }
+
unregisterGame(game);
}
|
