diff options
-rw-r--r-- | editor/plugins/editor_preview_plugins.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/editor/plugins/editor_preview_plugins.cpp b/editor/plugins/editor_preview_plugins.cpp index 3b85fad345..871b72d9c3 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<Texture2D> 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<Texture2D>()); Ref<Font> sampled_font; if (res->is_class("Font")) { sampled_font = res->duplicate(); |