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
path: root/source
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2017-06-16 16:11:23 +0300
committerClément Foucault <foucault.clem@gmail.com>2017-06-19 11:47:56 +0300
commit539225db8111796c2e194b13a5e4081fe487684a (patch)
tree928e56eec900b0937a1a559f8632bf8dae233faf /source
parent6dbe2b0385a5749415d2dc3d1a272018b1bfe3b8 (diff)
DrwManager: Remove the need for buffers to be available.
This way we can just avoid binding a texture by setting it's ref to NULL.
Diffstat (limited to 'source')
-rw-r--r--source/blender/draw/intern/draw_manager.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/draw/intern/draw_manager.c b/source/blender/draw/intern/draw_manager.c
index 485ce168bb5..f1a870992dc 100644
--- a/source/blender/draw/intern/draw_manager.c
+++ b/source/blender/draw/intern/draw_manager.c
@@ -1733,6 +1733,10 @@ static void draw_shgroup(DRWShadingGroup *shgroup, DRWState pass_state)
break;
}
tex = *((GPUTexture **)uni->value);
+ if (tex == NULL) {
+ /* In case texture is not yet available */
+ break;
+ }
GPU_texture_bind(tex, uni->bindloc);
bound_tex = MEM_callocN(sizeof(DRWBoundTexture), "DRWBoundTexture");