Commit 870d8799 authored by Thomas Eschenbacher's avatar Thomas Eschenbacher
Browse files

bugfix: cleanup code in destructor of PluginManager caused crash when closing...

bugfix: cleanup code in destructor of PluginManager caused crash when closing the window due to broken iterator
parent 02e2dc72
......@@ -9,10 +9,12 @@
* changed SAMPLE_INDEX_MAX to maximum value of a 32bit int (2.147.483.647)
* removed class MemoryManager, use Kwave::SampleArray directly as backend
for Kwave::Stripe (which reduces complexity a lot)
* bugfix: cleanup code in destructor of PluginManager caused crash when
closing the window due to broken iterator
19.07.70 [2019-03-16]
* bugfix for KDE #394358 (Kwave crashes when closing About dialog)
* bugfix for KDE #394358 (Kwave crashes when closing About dialog)
* bugfix: no longer use pa_write_start in PulseAudio playback (caused
invalid internal memory reuse in PulseAudio server + assert)
* bugfix for KDE #389159 (Recording Pause function does not work)
......
......@@ -95,7 +95,7 @@ Kwave::PluginManager::~PluginManager()
// release all loaded modules
for (QMap<QString, PluginModule>::iterator it(m_plugin_modules.begin());
it != m_plugin_modules.end(); ++it)
it != m_plugin_modules.end(); )
{
const QString &name = it.key();
PluginModule &p = it.value();
......@@ -109,12 +109,13 @@ Kwave::PluginManager::~PluginManager()
p.m_factory = Q_NULLPTR;
// remove the module from the list
m_plugin_modules.remove(name);
it = m_plugin_modules.erase(it);
// now the handle of the shared object can be released too
if (factory) delete factory;
} else {
// still in use
++it;
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment