From 54a19cefd1400a00a41f283be8916e010ed81de9 Mon Sep 17 00:00:00 2001 From: Clyde McQueen Date: Wed, 12 Jul 2023 07:39:55 -0700 Subject: [PATCH] Fix #807 --- mavutil.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mavutil.py b/mavutil.py index 54746173d..77366dc68 100644 --- a/mavutil.py +++ b/mavutil.py @@ -92,6 +92,9 @@ def __str__(self): def add_message(messages, mtype, msg): '''add a msg to array of messages, taking account of instance messages''' + if msg.get_type() == 'BAD_DATA': + # avoid dealing with instance field + return if msg._instance_field is None or getattr(msg, msg._instance_field, None) is None: # simple case, no instance field messages[mtype] = msg