mirror of
https://github.com/rwengine/openrw.git
synced 2024-09-18 16:32:32 +02: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,11 +7,13 @@
|
|||||||
|
|
||||||
#include <glm/gtc/matrix_transform.hpp>
|
#include <glm/gtc/matrix_transform.hpp>
|
||||||
|
|
||||||
Geometry::Geometry() : flags(0) {
|
Geometry::Geometry() : EBO(0), flags(0) {
|
||||||
}
|
}
|
||||||
|
|
||||||
Geometry::~Geometry() {
|
Geometry::~Geometry() {
|
||||||
glDeleteBuffers(1, &EBO);
|
if (EBO) {
|
||||||
|
glDeleteBuffers(1, &EBO);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ModelFrame::ModelFrame(unsigned int index, glm::mat3 dR, glm::vec3 dT)
|
ModelFrame::ModelFrame(unsigned int index, glm::mat3 dR, glm::vec3 dT)
|
||||||
|
Loading…
Reference in New Issue
Block a user