diff options
author | MarianoGNU <marianognu.easyrpg@gmail.com> | 2015-10-16 23:21:39 -0300 |
---|---|---|
committer | MarianoGNU <marianognu.easyrpg@gmail.com> | 2015-10-16 23:21:39 -0300 |
commit | a5ebb525000d8301f73377426a2c1924d70aaf86 (patch) | |
tree | 55eaf1e0e6553dbb34d236b07a051689ae8f2493 /core/io/image_loader.cpp | |
parent | 553edf1f250f34ca0ef0703b13b4d601f609e491 (diff) | |
parent | 17a90ddc0824bb51b5ea707f5d4d11aed301f91d (diff) |
Merge branch 'master' of https://github.com/okamstudio/godot
# Solved Conflicts:
# tools/editor/property_editor.cpp
Diffstat (limited to 'core/io/image_loader.cpp')
-rw-r--r-- | core/io/image_loader.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/core/io/image_loader.cpp b/core/io/image_loader.cpp index d3390ae199..2db6e00f0a 100644 --- a/core/io/image_loader.cpp +++ b/core/io/image_loader.cpp @@ -50,8 +50,10 @@ Error ImageLoader::load_image(String p_file,Image *p_image, FileAccess *p_custom if (!f) { Error err; f=FileAccess::open(p_file,FileAccess::READ,&err); - if (!f) + if (!f) { + print_line("ERROR OPENING FILE: "+p_file); return err; + } } String extension = p_file.extension(); @@ -62,15 +64,20 @@ Error ImageLoader::load_image(String p_file,Image *p_image, FileAccess *p_custom if (!loader[i]->recognize(extension)) continue; Error err = loader[i]->load_image(p_image,f); + if (err!=ERR_FILE_UNRECOGNIZED) { + + if (!p_custom) memdelete(f); + return err; } } - + print_line("NO LOADER?"); + if (!p_custom) memdelete(f); |