Skip to content

Commit

Permalink
HardwareReport: check for log is not null before trying to find GPS t…
Browse files Browse the repository at this point in the history
…ype from messages.
  • Loading branch information
IamPete1 committed Apr 24, 2024
1 parent f7838ae commit 2a02fdf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion HardwareReport/HardwareReport.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 2a02fdf

Please sign in to comment.