diff --git a/rwlib/source/data/Clump.cpp b/rwlib/source/data/Clump.cpp index 0a47f3bd..0e664512 100644 --- a/rwlib/source/data/Clump.cpp +++ b/rwlib/source/data/Clump.cpp @@ -7,11 +7,13 @@ #include -Geometry::Geometry() : flags(0) { +Geometry::Geometry() : EBO(0), flags(0) { } Geometry::~Geometry() { - glDeleteBuffers(1, &EBO); + if (EBO) { + glDeleteBuffers(1, &EBO); + } } ModelFrame::ModelFrame(unsigned int index, glm::mat3 dR, glm::vec3 dT)