diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-02-07 08:00:24 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-07 08:00:24 +0100 |
commit | 602cacae2190e2f8714b19158878d7a65c04e98d (patch) | |
tree | 29647a907d3e865e5539582cc5425438f4457b37 | |
parent | 481b05fef1918aed9cee47680cb55b997acc5daa (diff) | |
parent | 803ac608a62d738a5bec9c8dbed4b62c8bcd8b5a (diff) |
Merge pull request #57727 from kleonc/sprite_frames_editor_fix_loading_non_texture_crash
`SpriteFramesEditor` Fix crash when selecting non-`Texture2D` file for splitting
-rw-r--r-- | editor/plugins/sprite_frames_editor_plugin.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/editor/plugins/sprite_frames_editor_plugin.cpp b/editor/plugins/sprite_frames_editor_plugin.cpp index 014fa0e7a5..419076a3f6 100644 --- a/editor/plugins/sprite_frames_editor_plugin.cpp +++ b/editor/plugins/sprite_frames_editor_plugin.cpp @@ -285,7 +285,7 @@ void SpriteFramesEditor::_sheet_spin_changed(double) { } void SpriteFramesEditor::_prepare_sprite_sheet(const String &p_file) { - Ref<Resource> texture = ResourceLoader::load(p_file); + Ref<Texture2D> texture = ResourceLoader::load(p_file); if (!texture.is_valid()) { EditorNode::get_singleton()->show_warning(TTR("Unable to load images")); ERR_FAIL_COND(!texture.is_valid()); |