From a06a2669e5d3966d70bef0c785d1682ed89e0f99 Mon Sep 17 00:00:00 2001 From: Ralf Ramsauer Date: Tue, 22 Sep 2015 17:48:30 +0200 Subject: [PATCH] Check if logic is running --- doorlockd/main.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/doorlockd/main.cpp b/doorlockd/main.cpp index ad79d5a..c23cb9d 100644 --- a/doorlockd/main.cpp +++ b/doorlockd/main.cpp @@ -178,8 +178,10 @@ int main(int argc, char** argv) retval = 0; out: - l(LogLevel::info, "Stopping Doorlock Logic"); - logic.reset(); + if (logic) { + l(LogLevel::info, "Stopping Doorlock Logic"); + logic.reset(); + } l(LogLevel::notice, "Doorlockd stopped"); return retval; }