From ed2e1ddb370c863359710d763eb83a0dc9c6a5d7 Mon Sep 17 00:00:00 2001 From: SR_team Date: Fri, 8 Jul 2022 19:30:52 +0300 Subject: [PATCH] Fix double-free materials --- src/geometry.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/geometry.cpp b/src/geometry.cpp index 5d31c34..882b685 100644 --- a/src/geometry.cpp +++ b/src/geometry.cpp @@ -727,6 +727,7 @@ MaterialList::deinit(void) for(int32 i = 0; i < this->numMaterials; i++) this->materials[i]->destroy(); rwFree(this->materials); + this->materials = nil; } }