From 5eb49fcf7ec94fdc2b4012cc29176a37243fea29 Mon Sep 17 00:00:00 2001 From: Pavel Kirienko Date: Tue, 18 Mar 2014 16:40:08 +0400 Subject: [PATCH] Runtime check for GDTR::find() --- libuavcan/src/node/global_data_type_registry.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libuavcan/src/node/global_data_type_registry.cpp b/libuavcan/src/node/global_data_type_registry.cpp index 3d41c08ede..d9d2b3ecf1 100644 --- a/libuavcan/src/node/global_data_type_registry.cpp +++ b/libuavcan/src/node/global_data_type_registry.cpp @@ -124,6 +124,11 @@ void GlobalDataTypeRegistry::freeze() const DataTypeDescriptor* GlobalDataTypeRegistry::find(DataTypeKind kind, const char* name) const { + if (!name) + { + assert(0); + return NULL; + } const List* list = selectList(kind); if (!list) {