Skip to content

Commit

Permalink
Fix crash when TransformSelectedArea_UpdateableChange fails validation
Browse files Browse the repository at this point in the history
  • Loading branch information
Equbuxu committed Dec 2, 2023
1 parent 50061c4 commit af484ab
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,13 @@ public override void Dispose()
{
if (hasEnqueudImages)
throw new InvalidOperationException("Attempted to dispose the change while it's internally stored image is still used enqueued in some ChunkyImage. Most likely someone tried to dispose a change after ApplyTemporarily was called but before the subsequent call to Apply. Don't do that.");
foreach (var (_, (image, _)) in images!)

if (images is not null)
{
image.Dispose();
foreach (var (_, (image, _)) in images)
{
image.Dispose();
}
}

if (savedChunks is not null)
Expand Down

0 comments on commit af484ab

Please sign in to comment.