mirror of
https://github.com/godotengine/godot.git
synced 2024-12-01 16:42:26 +00:00
ERR_FAIL_NULL check file access
Null in ResourceImporterTexture::_save_stex
(cherry picked from commit b74bc42a43
)
This commit is contained in:
parent
c1b2bd6fb6
commit
64cfd5cbaa
@ -222,6 +222,7 @@ void ResourceImporterTexture::get_import_options(List<ImportOption> *r_options,
|
|||||||
void ResourceImporterTexture::_save_stex(const Ref<Image> &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) {
|
void ResourceImporterTexture::_save_stex(const Ref<Image> &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);
|
FileAccess *f = FileAccess::open(p_to_path, FileAccess::WRITE);
|
||||||
|
ERR_FAIL_NULL(f);
|
||||||
f->store_8('G');
|
f->store_8('G');
|
||||||
f->store_8('D');
|
f->store_8('D');
|
||||||
f->store_8('S');
|
f->store_8('S');
|
||||||
|
Loading…
Reference in New Issue
Block a user