Auditioner: check if removing synth succeeds
authorRobin Gareus <robin@gareus.org>
Sat, 24 Nov 2018 01:01:16 +0000 (02:01 +0100)
committerRobin Gareus <robin@gareus.org>
Sat, 24 Nov 2018 01:01:16 +0000 (02:01 +0100)
remove_processor() also calls drop_references, when successful.

libs/ardour/auditioner.cc

index cf070a8ca4e36a48a4b5ff20bd44ac0de4ab522f..1a08d40cde82a7e90337e4962be62880917e1136 100644 (file)
@@ -146,9 +146,9 @@ Auditioner::unload_synth (bool need_lock)
        if (!asynth) {
                return;
        }
-       remove_processor (asynth, NULL, need_lock);
-       asynth->drop_references ();
-       asynth.reset ();
+       if (0 == remove_processor (asynth, NULL, need_lock)) {
+               asynth.reset ();
+       }
 }
 
 int