From 8a758bbe267c13ecc686dcb05fda4505026a644c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20Br=C3=BCckner?= Date: Sun, 25 Jul 2021 17:07:51 +0200 Subject: [PATCH] Only stop live patch session if live patch was active --- blender/arm/live_patch.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/blender/arm/live_patch.py b/blender/arm/live_patch.py index 5b375227..9c4ce769 100644 --- a/blender/arm/live_patch.py +++ b/blender/arm/live_patch.py @@ -44,10 +44,11 @@ def start(): def stop(): """Stop the live patch session.""" global __running - __running = False + if __running: + __running = False - log.debug("Live patch session stopped") - bpy.msgbus.clear_by_owner(msgbus_owner) + log.debug("Live patch session stopped") + bpy.msgbus.clear_by_owner(msgbus_owner) def patch_export():