summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-05-21 10:55:59 +0200
committerGitHub <noreply@github.com>2020-05-21 10:55:59 +0200
commite6ff562a4bd0d6332c561757505cc16503104b04 (patch)
treebda77d5345104589f5df552277da18632824c0df
parent0b8cb945cf0d65a9061dee7c780a405d4b26ef00 (diff)
parent66a294d459cf54f673abd6483b7845daf36aea82 (diff)
Merge pull request #38907 from cj-dimaggio/rasterizer_dummy_leak
Delete DummyMesh when RasterizerStorageDummy is Freed
-rw-r--r--drivers/dummy/rasterizer_dummy.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/dummy/rasterizer_dummy.h b/drivers/dummy/rasterizer_dummy.h
index d619a20745..7af7678f63 100644
--- a/drivers/dummy/rasterizer_dummy.h
+++ b/drivers/dummy/rasterizer_dummy.h
@@ -861,6 +861,13 @@ public:
texture_owner.free(p_rid);
memdelete(texture);
}
+
+ if (mesh_owner.owns(p_rid)) {
+ // delete the mesh
+ DummyMesh *mesh = mesh_owner.getornull(p_rid);
+ mesh_owner.free(p_rid);
+ memdelete(mesh);
+ }
return true;
}