From 1685b1dba44e02ce1faace4a5de6d6cd0d98ef90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Thu, 24 Feb 2022 14:56:02 +0100 Subject: OCIO: Fix mip length in texture creation Also add an assert to avoid reproducing the error in the future. --- source/blender/gpu/intern/gpu_texture.cc | 1 + 1 file changed, 1 insertion(+) (limited to 'source/blender/gpu/intern/gpu_texture.cc') diff --git a/source/blender/gpu/intern/gpu_texture.cc b/source/blender/gpu/intern/gpu_texture.cc index da5f08f003e..762b819036c 100644 --- a/source/blender/gpu/intern/gpu_texture.cc +++ b/source/blender/gpu/intern/gpu_texture.cc @@ -192,6 +192,7 @@ static inline GPUTexture *gpu_texture_create(const char *name, eGPUDataFormat data_format, const void *pixels) { + BLI_assert(mips > 0); Texture *tex = GPUBackend::get()->texture_alloc(name); bool success = false; switch (type) { -- cgit v1.2.3