diff --git a/editor/import/resource_importer_texture.cpp b/editor/import/resource_importer_texture.cpp index 39500b1e185d..d783f302c23a 100644 --- a/editor/import/resource_importer_texture.cpp +++ b/editor/import/resource_importer_texture.cpp @@ -222,6 +222,7 @@ void ResourceImporterTexture::get_import_options(List *r_options, void ResourceImporterTexture::_save_stex(const Ref &p_image, const String &p_to_path, int p_compress_mode, float p_lossy_quality, Image::CompressMode p_vram_compression, bool p_mipmaps, int p_texture_flags, bool p_streamable, bool p_detect_3d, bool p_detect_srgb, bool p_force_rgbe, bool p_detect_normal, bool p_force_normal, bool p_force_po2_for_compressed) { FileAccess *f = FileAccess::open(p_to_path, FileAccess::WRITE); + ERR_FAIL_NULL(f); f->store_8('G'); f->store_8('D'); f->store_8('S');