From 7fabb01e76a82e3480bc193774713e1fc201c0e7 Mon Sep 17 00:00:00 2001 From: Peter Hall <33176108+IamPete1@users.noreply.github.com> Date: Wed, 24 Apr 2024 13:57:07 +0100 Subject: [PATCH] HardwareReport: check for log is not null before trying to find GPS type from messages. --- HardwareReport/HardwareReport.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HardwareReport/HardwareReport.js b/HardwareReport/HardwareReport.js index 9010a83c..26a32923 100644 --- a/HardwareReport/HardwareReport.js +++ b/HardwareReport/HardwareReport.js @@ -1207,7 +1207,7 @@ function load_gps(log) { } } - if ('MSG' in log.messageTypes) { + if ((log != null) && ('MSG' in log.messageTypes)) { const messages = log.get("MSG").Message // This regular expression is used to get the word after "as" to get the GPS device name.