summaryrefslogtreecommitdiff
path: root/drivers/gles3/rasterizer_storage_gles3.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gles3/rasterizer_storage_gles3.cpp')
-rw-r--r--drivers/gles3/rasterizer_storage_gles3.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/gles3/rasterizer_storage_gles3.cpp b/drivers/gles3/rasterizer_storage_gles3.cpp
index a7638b49ec..abbba13ee6 100644
--- a/drivers/gles3/rasterizer_storage_gles3.cpp
+++ b/drivers/gles3/rasterizer_storage_gles3.cpp
@@ -29,6 +29,7 @@
/*************************************************************************/
#include "rasterizer_storage_gles3.h"
+
#ifdef GLES3_ENABLED
#include "core/config/project_settings.h"
@@ -3716,10 +3717,11 @@ void RasterizerStorageGLES3::canvas_light_occluder_set_polylines(RID p_occluder,
co->lines = p_lines;
if (p_lines.size() != co->len) {
- if (co->index_id)
+ if (co->index_id) {
glDeleteBuffers(1, &co->index_id);
- if (co->vertex_id)
+ } if (co->vertex_id) {
glDeleteBuffers(1, &co->vertex_id);
+ }
co->index_id = 0;
co->vertex_id = 0;
@@ -4014,10 +4016,12 @@ bool RasterizerStorageGLES3::free(RID p_rid) {
} else if (canvas_occluder_owner.owns(p_rid)) {
CanvasOccluder *co = canvas_occluder_owner.get_or_null(p_rid);
- if (co->index_id)
+ if (co->index_id) {
glDeleteBuffers(1, &co->index_id);
- if (co->vertex_id)
+ }
+ if (co->vertex_id) {
glDeleteBuffers(1, &co->vertex_id);
+ }
canvas_occluder_owner.free(p_rid);
memdelete(co);