Skip to content

Commit

Permalink
ensure oi_name is never a nullptr
Browse files Browse the repository at this point in the history
  • Loading branch information
tyroguru committed Jun 12, 2023
1 parent 4c331fb commit d512d00
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion oi/DrgnUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,10 @@ std::string typeToName(drgn_type* type) {
const char* typeTag = drgn_type_tag(type);
if (typeTag != nullptr) {
typeName = typeTag;
} else if (type->_private.oi_name != nullptr) {
typeName = type->_private.oi_name;
} else {
typeName = type->_private.oi_name;
typeName = "";
}
// TODO: Lookup unnamed union in type->string flag
} else if (drgn_type_has_name(type)) {
Expand Down

0 comments on commit d512d00

Please sign in to comment.