summaryrefslogtreecommitdiff
path: root/scene/resources/texture.cpp
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2017-06-02 22:08:41 -0300
committerJuan Linietsky <reduzio@gmail.com>2017-06-02 22:08:41 -0300
commit8a1097a2243a9829d5d7e61ef10133f8096aa5e2 (patch)
tree2ec55a650b676975e6ef2ed60e25d68307381269 /scene/resources/texture.cpp
parente79d7149ea751e32312cb8625548085d4537c591 (diff)
many fixes to image loader, voxel cone tracing, etc.
Diffstat (limited to 'scene/resources/texture.cpp')
-rw-r--r--scene/resources/texture.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/resources/texture.cpp b/scene/resources/texture.cpp
index bc8deb501e..68a11b821d 100644
--- a/scene/resources/texture.cpp
+++ b/scene/resources/texture.cpp
@@ -494,9 +494,9 @@ Error StreamTexture::_load_data(const String &p_path, int &tw, int &th, int &fla
img = Image::lossy_unpacker(pv);
}
- if (img.is_null()) {
+ if (img.is_null() || img->empty()) {
memdelete(f);
- ERR_FAIL_COND_V(img->empty(), ERR_FILE_CORRUPT);
+ ERR_FAIL_COND_V(img.is_null() || img->empty(), ERR_FILE_CORRUPT);
}
total_size += img->get_data().size();