Skip to content

Commit 64b0f61

Browse files
Fix crash for classes without an icon
1 parent 0fdbf05 commit 64b0f61

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

editor/doc/editor_help.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -471,6 +471,9 @@ void EditorHelp::_add_type(const String &p_type, const String &p_enum, bool p_is
471471

472472
void EditorHelp::_add_type_icon(const String &p_type, int p_size, const String &p_fallback) {
473473
Ref<Texture2D> icon = EditorNode::get_singleton()->get_class_icon(p_type, p_fallback);
474+
if (icon.is_null()) {
475+
return;
476+
}
474477
Vector2i size = Vector2i(icon->get_width(), icon->get_height());
475478
if (p_size > 0) {
476479
// Ensures icon scales proportionally on both axes, based on icon height.

0 commit comments

Comments
 (0)