summaryrefslogtreecommitdiff
path: root/src/drumkitloader.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/drumkitloader.cc')
-rw-r--r--src/drumkitloader.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/drumkitloader.cc b/src/drumkitloader.cc
index be74624..c997dfb 100644
--- a/src/drumkitloader.cc
+++ b/src/drumkitloader.cc
@@ -40,6 +40,13 @@ DrumKitLoader::DrumKitLoader(DrumGizmo *dg)
DrumKitLoader::~DrumKitLoader()
{
+ if(!quitit) {
+ stop();
+ }
+}
+
+void DrumKitLoader::stop()
+{
quitit = true;
semaphore.post();
wait_stop();
@@ -125,6 +132,8 @@ void DrumKitLoader::thread_main()
drumgizmo->sendGUIMessage(ls);
a++;
+
+ if(quitit) return;
}
i++;