diff options
author | sps1112 <sidps1112@gmail.com> | 2021-03-03 15:31:31 +0530 |
---|---|---|
committer | sps1112 <sidps1112@gmail.com> | 2021-03-03 15:31:31 +0530 |
commit | 18bb6e74be78342cfed9a141dcaba8dbd311f8f3 (patch) | |
tree | e0c0803c9fe9694356e1ae0d9dbc31c15d5977b1 /scene/3d | |
parent | 4d1f83a621a03a42a6ab7765084db84aab32256f (diff) |
Add size<=0 check in BakedLighmapData._get_user_data()
Diffstat (limited to 'scene/3d')
-rw-r--r-- | scene/3d/baked_lightmap.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/scene/3d/baked_lightmap.cpp b/scene/3d/baked_lightmap.cpp index 578ea823f0..402e2b8f40 100644 --- a/scene/3d/baked_lightmap.cpp +++ b/scene/3d/baked_lightmap.cpp @@ -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) { |