diff --git a/oi/type_graph/DrgnParser.cpp b/oi/type_graph/DrgnParser.cpp index 952cc73..61f7a89 100644 --- a/oi/type_graph/DrgnParser.cpp +++ b/oi/type_graph/DrgnParser.cpp @@ -125,12 +125,14 @@ Type& DrgnParser::enumerateType(struct drgn_type* type) { } catch (const DrgnParserError& e) { depth_--; if (isTypeIncomplete) { - const char* typeName = ""; + const char* typeName = nullptr; if (drgn_type_has_name(type)) { typeName = drgn_type_name(type); } else if (drgn_type_has_tag(type)) { typeName = drgn_type_tag(type); } + if (typeName == nullptr) + typeName = ""; return makeType(nullptr, typeName); } else {