Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntony Riakiotakis <kalast@gmail.com>2015-02-03 18:17:58 +0300
committerAntony Riakiotakis <kalast@gmail.com>2015-02-03 18:18:19 +0300
commitc48c20b498d97cd4b9d31d040872fac82f0f70aa (patch)
tree94b480effd0d124994e9454c9080f3be6ccef6ce /source/blender
parent2d4980e68ebbff4cd78f71abb42e767b0d9a1247 (diff)
Fix T43530 using blender on remote connection crashes
Issue here is that remote connection will use OpenGL 1.1. There was a call here that would free VBOs always without a check, however the VBO free function pointer is NULL on such contexts causing a crash. This must have been causing some of the crashes with old contexts. While I think supporting those systems is not such a good idea in general, they can have a few more moments of support I guess. Things might be better now for systems using OGL 1.1 though there are still things that could be done better here - for instance going to dyntopo can crash immediately because we don't have a fallback implementation there. It might be worth reimplementing sculpting with vertex arrays for the legacy case too, but I guess if we move on to OpenGL 2.1 soon this is a bit of a wasted effort.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/gpu/intern/gpu_buffers.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/gpu/intern/gpu_buffers.c b/source/blender/gpu/intern/gpu_buffers.c
index f0ef55ae673..d1102b03e9a 100644
--- a/source/blender/gpu/intern/gpu_buffers.c
+++ b/source/blender/gpu/intern/gpu_buffers.c
@@ -187,8 +187,10 @@ static void gpu_buffer_pool_free_unused(GPUBufferPool *pool)
while (pool->totbuf)
gpu_buffer_pool_delete_last(pool);
- glDeleteBuffersARB(pool->totpbvhbufids, pool->pbvhbufids);
- pool->totpbvhbufids = 0;
+ if (pool->totpbvhbufids > 0) {
+ glDeleteBuffersARB(pool->totpbvhbufids, pool->pbvhbufids);
+ pool->totpbvhbufids = 0;
+ }
BLI_mutex_unlock(&buffer_mutex);
}