Ensure a2j is started before attempting to stop it

When stopping jackd, ensure that a2j is actually started before
attempting to stop it. Otherwise we get an error and jackd is not
stopped.

Signed-off-by: Alex Tsitsimpis <alex.tsitsimpis@gmail.com>
This commit is contained in:
Alex Tsitsimpis 2019-11-17 20:21:07 +02:00 committed by Filipe Coelho
parent 0642494c69
commit 12e3907981
1 changed files with 1 additions and 1 deletions

View File

@ -1667,7 +1667,7 @@ class CadenceMainW(QMainWindow, ui_cadence.Ui_CadenceMainW):
@pyqtSlot()
def slot_JackServerStop(self):
if gDBus.a2j:
if gDBus.a2j and bool(gDBus.a2j.is_started()):
gDBus.a2j.stop()
try:
gDBus.jack.StopServer()