diff options
| author | Al <26797547+Al12rs@users.noreply.github.com> | 2020-06-11 11:54:07 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-06-11 11:54:07 -0700 |
| commit | 628b56144d72cca5945f07913b7df3f996d2794e (patch) | |
| tree | e224352b11aa4d9346106986c1d6d791c1a60297 /src/plugincontainer.cpp | |
| parent | 297cb8320f91377f8029fe9318534f34c83e7461 (diff) | |
| parent | 5d0b6b0eab489e2010f6286647864889cae7422a (diff) | |
Merge pull request #1124 from Holt59/fix-unloading-of-plugins
Manually unload plugins to avoid issue with automatic unloading.
Diffstat (limited to 'src/plugincontainer.cpp')
| -rw-r--r-- | src/plugincontainer.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/plugincontainer.cpp b/src/plugincontainer.cpp index caab2115..d989fac9 100644 --- a/src/plugincontainer.cpp +++ b/src/plugincontainer.cpp @@ -28,6 +28,10 @@ PluginContainer::PluginContainer(OrganizerCore *organizer) {
}
+PluginContainer::~PluginContainer() {
+ m_Organizer = nullptr;
+ unloadPlugins();
+}
void PluginContainer::setUserInterface(IUserInterface *userInterface, QWidget *widget)
{
@@ -213,7 +217,9 @@ void PluginContainer::unloadPlugins() }
// disconnect all slots before unloading plugins so plugins don't have to take care of that
- m_Organizer->disconnectPlugins();
+ if (m_Organizer != nullptr) {
+ m_Organizer->disconnectPlugins();
+ }
bf::for_each(m_Plugins, clearPlugins());
|
