1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-11 13:10:58 +00:00

Fixes bugs found by Sonarcloud and Coverity

This commit is contained in:
qarmin
2020-03-02 19:17:20 +01:00
parent 0c22f5a447
commit 1f209bfc41
10 changed files with 25 additions and 13 deletions

View File

@@ -1906,8 +1906,10 @@ void RasterizerStorageRD::mesh_add_surface(RID p_mesh, const VS::SurfaceData &p_
for (int i = 0; i < p_surface.blend_shapes.size(); i++) {
ERR_FAIL_COND(p_surface.blend_shapes[i].size() != p_surface.vertex_data.size());
if (p_surface.blend_shapes[i].size() != p_surface.vertex_data.size()) {
memdelete(s);
ERR_FAIL_COND(p_surface.blend_shapes[i].size() != p_surface.vertex_data.size());
}
RID vertex_buffer = RD::get_singleton()->vertex_buffer_create(p_surface.blend_shapes[i].size(), p_surface.blend_shapes[i]);
s->blend_shapes.push_back(vertex_buffer);
}