1
0
Fork 0

SpriteFramesEditor Fix crash when selecting non-Texture file for splitting

(cherry picked from commit 87b4db9e63)
This commit is contained in:
kleonc 2022-02-06 23:39:26 +01:00 committed by Rémi Verschelde
parent e9f93155c6
commit a5b85c331e
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 1 additions and 1 deletions

View File

@ -299,7 +299,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());