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:
Diffstat (limited to 'source/blender/draw/intern/draw_cache_inline.h')
-rw-r--r--source/blender/draw/intern/draw_cache_inline.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/draw/intern/draw_cache_inline.h b/source/blender/draw/intern/draw_cache_inline.h
index 12dc0a47a68..f14d23dafcf 100644
--- a/source/blender/draw/intern/draw_cache_inline.h
+++ b/source/blender/draw/intern/draw_cache_inline.h
@@ -72,8 +72,10 @@ BLI_INLINE void DRW_ibo_request(GPUBatch *batch, GPUIndexBuf **ibo)
if (*ibo == NULL) {
*ibo = MEM_callocN(sizeof(GPUIndexBuf), "GPUIndexBuf");
}
- GPU_batch_vao_cache_clear(batch);
- batch->elem = *ibo;
+ if (batch != NULL) {
+ GPU_batch_vao_cache_clear(batch);
+ batch->elem = *ibo;
+ }
}
BLI_INLINE bool DRW_ibo_requested(GPUIndexBuf *ibo)