diff options
-rw-r--r-- | src/systemc/core/object.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/systemc/core/object.cc b/src/systemc/core/object.cc index e066a239f..1fb1d4591 100644 --- a/src/systemc/core/object.cc +++ b/src/systemc/core/object.cc @@ -72,7 +72,7 @@ popObject(Objects *objects, const std::string &name) Object::Object(sc_core::sc_object *_sc_obj) : Object(_sc_obj, "object") {} Object::Object(sc_core::sc_object *_sc_obj, const char *obj_name) : - _sc_obj(_sc_obj), _basename(obj_name), parent(nullptr) + _sc_obj(_sc_obj), _basename(obj_name ? obj_name : ""), parent(nullptr) { if (_basename == "") _basename = "object"; |