From a3c298ca930ed108dc4f1d86b0d46bb60310a64e Mon Sep 17 00:00:00 2001 From: Jonathan Bennett Date: Sat, 8 Jan 2022 13:17:04 -0600 Subject: [PATCH] Add nullptr checks to prevent a crash when in NODECT mode --- src/zm_monitor.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/zm_monitor.cpp b/src/zm_monitor.cpp index 008ca8a77..7a8d49b4d 100644 --- a/src/zm_monitor.cpp +++ b/src/zm_monitor.cpp @@ -2163,6 +2163,7 @@ bool Monitor::Analyse() { snap->analysis_image->Overlay(*(zone.AlarmImage())); } // end if zone is alarmed } // end foreach zone + if (snap->analysis_image != nullptr) alarm_image.Assign(*(snap->analysis_image)); } // end if image. @@ -2177,6 +2178,7 @@ bool Monitor::Analyse() { snap->analysis_image->Overlay(*(zone.AlarmImage())); } // end if zone is alarmed } // end foreach zone + if (snap->analysis_image != nullptr) alarm_image.Assign(*(snap->analysis_image)); }