mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-22 01:40:35 +08:00
GDTR remove() fix
This commit is contained in:
@@ -47,12 +47,13 @@ GlobalDataTypeRegistry::RegistResult GlobalDataTypeRegistry::remove(Entry* dtd)
|
|||||||
if (!list)
|
if (!list)
|
||||||
return RegistResultInvalidParams;
|
return RegistResultInvalidParams;
|
||||||
|
|
||||||
Entry* p = list->get();
|
list->remove(dtd); // If this call came from regist<>(), that would be enough
|
||||||
|
Entry* p = list->get(); // But anyway
|
||||||
while (p)
|
while (p)
|
||||||
{
|
{
|
||||||
Entry* const next = p->getNextListNode();
|
Entry* const next = p->getNextListNode();
|
||||||
if (p->descriptor.match(dtd->descriptor.getKind(), dtd->descriptor.getName()))
|
if (p->descriptor.match(dtd->descriptor.getKind(), dtd->descriptor.getName()))
|
||||||
list->remove(dtd);
|
list->remove(p);
|
||||||
p = next;
|
p = next;
|
||||||
}
|
}
|
||||||
return RegistResultOk;
|
return RegistResultOk;
|
||||||
|
|||||||
Reference in New Issue
Block a user