From 216aba82286d620af228279bc7de2121d4aa74a0 Mon Sep 17 00:00:00 2001 From: sps1112 Date: Wed, 3 Mar 2021 15:31:31 +0530 Subject: [PATCH] Add size<=0 check in BakedLighmapData._get_user_data() (cherry picked from commit 18bb6e74be78342cfed9a141dcaba8dbd311f8f3) --- scene/3d/baked_lightmap.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/scene/3d/baked_lightmap.cpp b/scene/3d/baked_lightmap.cpp index 13dab2e75ad..b7b7fde2e0a 100644 --- a/scene/3d/baked_lightmap.cpp +++ b/scene/3d/baked_lightmap.cpp @@ -156,6 +156,7 @@ void BakedLightmapData::clear_data() { } void BakedLightmapData::_set_user_data(const Array &p_data) { + ERR_FAIL_COND(p_data.size() <= 0); // Detect old lightmapper format if (p_data.size() % 3 == 0) {