diff options
-rw-r--r-- | src/state_machine.hpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/state_machine.hpp b/src/state_machine.hpp index 6711401..388b79a 100644 --- a/src/state_machine.hpp +++ b/src/state_machine.hpp @@ -511,12 +511,18 @@ struct MountPointStateMachine try { auto ret = handleMount(yield, machine); - machine.target->credentials.reset(); + if (machine.target) + { + machine.target->credentials.reset(); + } return ret; } catch (...) { - machine.target->credentials.reset(); + if (machine.target) + { + machine.target->credentials.reset(); + } throw; return false; } |