소스 검색

SpriteFramesEditor Fix crash when selecting non-Texture file for splitting

(cherry picked from commit 87b4db9e636a8abf5996b1d6f028132a5dea4a08)
kleonc 3 년 전
부모
커밋
a5b85c331e
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      editor/plugins/sprite_frames_editor_plugin.cpp

+ 1 - 1
editor/plugins/sprite_frames_editor_plugin.cpp

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