Skip to content

Commit f37472f

Browse files
Update editor/create_dialog.cpp
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
1 parent 67fe051 commit f37472f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

editor/create_dialog.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ bool CreateDialog::_should_hide_type(const StringName &p_type) const {
198198
// Abstract scripts cannot be instantiated.
199199
String path = ScriptServer::get_global_class_path(p_type);
200200
Ref<Script> scr = ResourceLoader::load(path, "Script");
201-
return scr->is_abstract();
201+
return scr.is_null() || scr->is_abstract();
202202
}
203203

204204
return false;

0 commit comments

Comments
 (0)