From 7d8d337b2c47df88498067ff9091386691242144 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Furkan=20T=C3=BCrkal?= Date: Sat, 22 Jun 2019 15:52:51 +0300 Subject: fix some crashes --- scene/resources/texture.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'scene/resources/texture.cpp') 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 &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(); -- cgit v1.2.3