Ver código fonte

Add size<=0 check in BakedLighmapData._get_user_data()

(cherry picked from commit 18bb6e74be78342cfed9a141dcaba8dbd311f8f3)
sps1112 4 anos atrás
pai
commit
216aba8228
1 arquivos alterados com 1 adições e 0 exclusões
  1. 1 0
      scene/3d/baked_lightmap.cpp

+ 1 - 0
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) {