diff options
author | Furkan Türkal <furkan.turkal@hotmail.com> | 2019-06-22 15:52:51 +0300 |
---|---|---|
committer | Furkan Türkal <furkan.turkal@hotmail.com> | 2019-07-01 14:28:29 +0300 |
commit | 7d8d337b2c47df88498067ff9091386691242144 (patch) | |
tree | 50dc0cb8fa683586cc947a2994fe48b45bba91b8 /scene/resources | |
parent | 30383a1cdc00d398349515b81a85fa1d3da7ae37 (diff) |
fix some crashes
Diffstat (limited to 'scene/resources')
-rw-r--r-- | scene/resources/texture.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/scene/resources/texture.cpp b/scene/resources/texture.cpp index 6e0bc43296..4e2e29654b 100644 --- a/scene/resources/texture.cpp +++ b/scene/resources/texture.cpp @@ -1487,8 +1487,10 @@ uint32_t CubeMap::get_flags() const { void CubeMap::set_side(Side p_side, const Ref<Image> &p_image) { + ERR_FAIL_COND(p_image.is_null()); ERR_FAIL_COND(p_image->empty()); ERR_FAIL_INDEX(p_side, 6); + if (!_is_valid()) { format = p_image->get_format(); w = p_image->get_width(); |