Merge branch 'blender-v2.82-release'

This commit is contained in:
Philipp Oeser
2020-01-20 21:27:39 +01:00

View File

@@ -3891,7 +3891,12 @@ static void image_initialize_after_load(Image *ima, ImageUser *iuser, ImBuf *UNU
BKE_image_tag_time(ima);
ImageTile *tile = BKE_image_get_tile_from_iuser(ima, iuser);
tile->ok = IMA_OK_LOADED;
/* Images should never get loaded if the corresponding tile does not exist,
* but we should at least not crash if it happens due to a bug elsewhere. */
BLI_assert(tile != NULL);
if (tile != NULL) {
tile->ok = IMA_OK_LOADED;
}
}
static int imbuf_alpha_flags_for_image(Image *ima)
@@ -4764,14 +4769,14 @@ BLI_INLINE bool image_quick_test(Image *ima, ImageUser *iuser)
return false;
}
ImageTile *tile = BKE_image_get_tile_from_iuser(ima, iuser);
if (iuser) {
if (iuser->ok == 0) {
return false;
}
}
else if (tile == NULL) {
ImageTile *tile = BKE_image_get_tile_from_iuser(ima, iuser);
if (tile == NULL) {
return false;
}
else if (tile->ok == 0) {