diff --git a/lib/kwinglutils.cpp b/lib/kwinglutils.cpp index b746927c66..a0a82da945 100644 --- a/lib/kwinglutils.cpp +++ b/lib/kwinglutils.cpp @@ -1083,11 +1083,17 @@ class GLVertexBufferPrivate , numberVertices( 0 ) , dimension( 2 ) { - glGenBuffers( 2, buffers ); + if( GLVertexBufferPrivate::supported ) + { + glGenBuffers( 2, buffers ); + } } ~GLVertexBufferPrivate() { - glDeleteBuffers( 2, buffers ); + if( GLVertexBufferPrivate::supported ) + { + glDeleteBuffers( 2, buffers ); + } } GLVertexBuffer::UsageHint hint; GLuint buffers[2];