Merge pull request #57728 from kleonc/sprite_frames_editor_fix_loading_non_texture_crash_3x

[3.x] `SpriteFramesEditor` Fix crash when selecting non-`Texture` file for splitting
This commit is contained in:
Rémi Verschelde 2022-02-07 08:01:01 +01:00 committed by GitHub
commit 3358b18641
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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<Texture> 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());