mirror of
https://github.com/godotengine/godot.git
synced 2024-11-11 14:43:44 +00:00
Merge pull request #46616 from sps1112/fix-bakedlightmap-crash
Add size check in BakedLightmapData::_set_user_data()
This commit is contained in:
commit
f3e98c286a
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user