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) {