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:
Brecht Van Lommel 2020-02-15 18:53:08 +01:00
parent c6928843dc
commit ab18dbb67e
Notes: blender-bot 2023-02-14 02:27:51 +01:00
Referenced by issue #74274, Blender 2.82a proposed revisions
1 changed files with 1 additions and 1 deletions

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