From ab18dbb67e059ce1505189a14739e1e4deffacc1 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Sat, 15 Feb 2020 18:53:08 +0100 Subject: Fix potential crash with Eevee render of missing image textures This NULL check is needed elsewhere, do it here as well. --- source/blender/gpu/intern/gpu_draw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/gpu/intern/gpu_draw.c b/source/blender/gpu/intern/gpu_draw.c index cac3ba37b0a..6afff4f68f1 100644 --- a/source/blender/gpu/intern/gpu_draw.c +++ b/source/blender/gpu/intern/gpu_draw.c @@ -880,7 +880,7 @@ GPUTexture *GPU_texture_from_blender(Image *ima, ImageUser *iuser, ImBuf *ibuf, * texture with zero bindcode so we don't keep trying. */ uint bindcode = 0; ImageTile *tile = BKE_image_get_tile(ima, 0); - if (tile->ok == 0) { + if (tile == NULL || tile->ok == 0) { *tex = GPU_texture_from_bindcode(textarget, bindcode); return *tex; } -- cgit v1.2.3