diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2020-02-15 20:53:08 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2020-02-15 22:32:08 +0300 |
commit | ab18dbb67e059ce1505189a14739e1e4deffacc1 (patch) | |
tree | e41c2014bb611ac5c2d0b7a8de01125eef5df207 /source/blender/gpu/intern/gpu_draw.c | |
parent | c6928843dc9f07f4676048309d7a895ea0a1ef4e (diff) |
Fix potential crash with Eevee render of missing image textures
This NULL check is needed elsewhere, do it here as well.
Diffstat (limited to 'source/blender/gpu/intern/gpu_draw.c')
-rw-r--r-- | source/blender/gpu/intern/gpu_draw.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; } |