Fix T73898: UDIM crash changing form tiled to single

This commit is contained in:
Campbell Barton 2020-02-17 12:33:12 +11:00
parent 819af2094b
commit d6977b5387
Notes: blender-bot 2024-01-31 11:35:08 +01:00
Referenced by issue #74274, Blender 2.82a proposed revisions
Referenced by issue #73898, 2.82 crash when changing image from tiled to single
1 changed files with 3 additions and 1 deletions

View File

@ -3364,7 +3364,9 @@ void BKE_image_signal(Main *bmain, Image *ima, ImageUser *iuser, int signal)
if (ima->source != IMA_SRC_TILED) {
/* Free all but the first tile. */
ImageTile *base_tile = BKE_image_get_tile(ima, 0);
for (ImageTile *tile = base_tile->next; tile; tile = tile->next) {
BLI_assert(base_tile == ima->tiles.first);
for (ImageTile *tile = base_tile->next, *tile_next; tile; tile = tile_next) {
tile_next = tile->next;
image_free_tile(ima, tile);
MEM_freeN(tile);
}