Browse Source

gl: do not call glDeleteBuffers with a zero-length list, it crashes on

the PS3.
legacy
Sam Hocevar sam 13 years ago
parent
commit
28f8fce429
1 changed files with 4 additions and 2 deletions
  1. +4
    -2
      src/scene.cpp

+ 4
- 2
src/scene.cpp View File

@@ -92,8 +92,10 @@ Scene::Scene(float angle)
Scene::~Scene()
{
/* FIXME: this must be done while the GL context is still active.
* Change the architecture to make sure of that. */
glDeleteBuffers(data->nbufs, data->bufs);
* Change the code architecture to make sure of that. */
/* XXX: The test is necessary because of a crash with PSGL. */
if (data->nbufs > 0)
glDeleteBuffers(data->nbufs, data->bufs);
#if defined HAVE_GL_2X
glDeleteVertexArrays(1, &data->vao);
#endif


Loading…
Cancel
Save