diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-07-01 14:59:29 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-01 14:59:29 +0200 |
commit | 6b30f284a0544972f761be3e92ad8d1b176c9f9f (patch) | |
tree | 5edd19124ce8c9265a869a8171541d5ff7c60e17 /scene/resources | |
parent | b0ce9401ffa731cc346ab6762fd0794709634428 (diff) | |
parent | 7d8d337b2c47df88498067ff9091386691242144 (diff) |
Merge pull request #29980 from Dentrax/directed-by-qarmin
Fix some editor 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 3a0144849a..a5e9351753 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(); |