Merge pull request #46616 from sps1112/fix-bakedlightmap-crash

Add size check in BakedLightmapData::_set_user_data()
This commit is contained in:
Rémi Verschelde 2021-03-03 17:00:38 +01:00 committed by GitHub
commit f3e98c286a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -78,6 +78,7 @@ void BakedLightmapData::clear_users() {
}
void BakedLightmapData::_set_user_data(const Array &p_data) {
ERR_FAIL_COND(p_data.size() <= 0);
ERR_FAIL_COND((p_data.size() % 4) != 0);
for (int i = 0; i < p_data.size(); i += 4) {