diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2013-04-25 21:22:19 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2013-04-25 21:22:19 +0200 |
commit | 215bade4f4d5b590d03c12fc62f1a20e3fa59ef3 (patch) | |
tree | 12bbba17d9d2c1822ee46ef3290ecfd272008435 /src/drumkitloader.cc | |
parent | 25b7c03c47f8558e4759b0845eb367b580f3f9b4 (diff) |
Fixed crash on plugin-unload while drumkit load is in progress.
Diffstat (limited to 'src/drumkitloader.cc')
-rw-r--r-- | src/drumkitloader.cc | 9 |
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++; |