prevent crash on stop

master
Nicolò Balzarotti 2023-03-30 16:10:15 +02:00
parent 3617f71664
commit 77ce399f4f
1 changed files with 3 additions and 1 deletions

View File

@ -146,7 +146,9 @@ class State():
self.postload()
def stop(self):
self.current_phase().exit(self.env)
phase = self.current_phase()
if phase is not None:
phase.exit(self.env)
self.done(message='(concat "Recipe " (recipe-name) " stopped manually")')
def loadByName(self, recipe):