Skip to content

Commit

Permalink
Merge pull request #53431 from MaxLap/new_instance_error_message
Browse files Browse the repository at this point in the history
  • Loading branch information
akien-mga authored Oct 5, 2021
2 parents d9af98e + 29dc8de commit 3ae1d2d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/object/class_db.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ Object *ClassDB::instantiate(const StringName &p_class) {
}
ERR_FAIL_COND_V_MSG(!ti, nullptr, "Cannot get class '" + String(p_class) + "'.");
ERR_FAIL_COND_V_MSG(ti->disabled, nullptr, "Class '" + String(p_class) + "' is disabled.");
ERR_FAIL_COND_V(!ti->creation_func, nullptr);
ERR_FAIL_COND_V_MSG(!ti->creation_func, nullptr, "Class '" + String(p_class) + "' or its base class cannot be instantiated.");
}
#ifdef TOOLS_ENABLED
if (ti->api == API_EDITOR && !Engine::get_singleton()->is_editor_hint()) {
Expand Down

0 comments on commit 3ae1d2d

Please sign in to comment.