From e9b32de2a51322d69e8a45e818eb27c0755b6a3d Mon Sep 17 00:00:00 2001 From: Miguel de Icaza Date: Sat, 20 Dec 2025 12:47:49 -0500 Subject: [PATCH] Fix editor crash attempting to generate preview for invalid BitMap Fixes #114246. --- editor/inspector/editor_preview_plugins.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/editor/inspector/editor_preview_plugins.cpp b/editor/inspector/editor_preview_plugins.cpp index 9afc324b2b..52a317737d 100644 --- a/editor/inspector/editor_preview_plugins.cpp +++ b/editor/inspector/editor_preview_plugins.cpp @@ -231,6 +231,9 @@ bool EditorBitmapPreviewPlugin::handles(const String &p_type) const { Ref EditorBitmapPreviewPlugin::generate(const Ref &p_from, const Size2 &p_size, Dictionary &p_metadata) const { Ref bm = p_from; + if (bm.is_null()) { + return Ref(); + } if (bm->get_size() == Size2()) { return Ref();