diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2017-06-16 16:11:23 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2017-06-19 11:47:56 +0300 |
commit | 539225db8111796c2e194b13a5e4081fe487684a (patch) | |
tree | 928e56eec900b0937a1a559f8632bf8dae233faf /source/blender | |
parent | 6dbe2b0385a5749415d2dc3d1a272018b1bfe3b8 (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/blender')
-rw-r--r-- | source/blender/draw/intern/draw_manager.c | 4 |
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"); |