Emit a diagnostic message instead of crashing when an argument entry is missing.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@116114 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Interpreter/CommandObject.cpp b/source/Interpreter/CommandObject.cpp
index 5e2ef9a..2210fc8 100644
--- a/source/Interpreter/CommandObject.cpp
+++ b/source/Interpreter/CommandObject.cpp
@@ -508,7 +508,12 @@
if (entry->arg_type != arg_type)
entry = CommandObject::FindArgumentDataByType (arg_type);
- return entry->arg_name;
+ if (entry)
+ return entry->arg_name;
+
+ StreamString str;
+ str << "Arg name for type (" << arg_type << ") not in arg table!";
+ return str.GetData();
}
bool