From 794474afab76fed798f63103c7c52e3cad2ce2f9 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Wed, 2 Sep 2020 17:22:00 -0400 Subject: [PATCH] Add UNKNOWN status type. test for shared_data in ShmValid() --- src/zm_monitor.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/zm_monitor.h b/src/zm_monitor.h index 345a85862..e020ba391 100644 --- a/src/zm_monitor.h +++ b/src/zm_monitor.h @@ -88,6 +88,7 @@ public: } Orientation; typedef enum { + UNKNOWN, IDLE, PREALARM, ALARM, @@ -425,7 +426,7 @@ public: bool connect(); inline int ShmValid() const { - return shared_data->valid; + return shared_data && shared_data->valid; } inline unsigned int Id() const {