summaryrefslogtreecommitdiff
path: root/src/support/name.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/support/name.h')
-rw-r--r--src/support/name.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/support/name.h b/src/support/name.h
index b77397555..ae01db787 100644
--- a/src/support/name.h
+++ b/src/support/name.h
@@ -40,8 +40,11 @@ struct Name : public cashew::IString {
Name(const std::string& str) : cashew::IString(str.c_str(), false) {}
friend std::ostream& operator<<(std::ostream& o, Name name) {
- assert(name.str);
- return o << '$' << name.str; // reference interpreter requires we prefix all names
+ if (name.str) {
+ return o << '$' << name.str; // reference interpreter requires we prefix all names
+ } else {
+ return o << "(null Name)";
+ }
}
static Name fromInt(size_t i) {