Fix potential crash with Eevee render of missing image textures

This NULL check is needed elsewhere, do it here as well.
This commit is contained in:
2020-02-15 18:53:08 +01:00
parent c6928843dc
commit ab18dbb67e

View File

@@ -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;
}