diff --git a/editor/plugins/editor_preview_plugins.cpp b/editor/plugins/editor_preview_plugins.cpp index ed1194efce3..f7ec0f8c5c4 100644 --- a/editor/plugins/editor_preview_plugins.cpp +++ b/editor/plugins/editor_preview_plugins.cpp @@ -824,6 +824,7 @@ bool EditorFontPreviewPlugin::handles(const String &p_type) const { Ref EditorFontPreviewPlugin::generate_from_path(const String &p_path, const Size2 &p_size) const { RES res = ResourceLoader::load(p_path); + ERR_FAIL_COND_V(res.is_null(), Ref()); Ref sampled_font; if (res->is_class("Font")) { sampled_font = res->duplicate();