mirror of
https://github.com/rwengine/openrw.git
synced 2024-11-07 03:12:36 +01:00
Fix unit test 'LoaderDFF/test_clump_clone'.
This test crashed apparently only on macOS, although it should have not worked on Linux as well as it exhibits undefined behavior Anyway, the cause was passing a uninitialized variable into OpenGL as a buffer id. Just initialize it with 0 (reserved 'no object' id) and check before using it.
This commit is contained in:
parent
fd2637f5be
commit
bbf0752a3d
@ -7,12 +7,14 @@
|
||||
|
||||
#include <glm/gtc/matrix_transform.hpp>
|
||||
|
||||
Geometry::Geometry() : flags(0) {
|
||||
Geometry::Geometry() : EBO(0), flags(0) {
|
||||
}
|
||||
|
||||
Geometry::~Geometry() {
|
||||
if (EBO) {
|
||||
glDeleteBuffers(1, &EBO);
|
||||
}
|
||||
}
|
||||
|
||||
ModelFrame::ModelFrame(unsigned int index, glm::mat3 dR, glm::vec3 dT)
|
||||
: index(index)
|
||||
|
Loading…
Reference in New Issue
Block a user