Skip to content

Commit

Permalink
MeterImage: Properly dispose of image in cases where ImageName was re…
Browse files Browse the repository at this point in the history
…moved dynamically
  • Loading branch information
brianferguson committed Aug 29, 2018
1 parent e104098 commit 3fc54c5
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Library/MeterImage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,15 @@ void MeterImage::Initialize()
m_ImageNameResult = m_ImageName;
LoadImage(m_ImageName, true);
}
else if (m_Image.IsLoaded())
{
m_Image.DisposeImage();

if (m_MaskImage.IsLoaded())
{
m_MaskImage.DisposeImage();
}
}
}

/*
Expand Down

0 comments on commit 3fc54c5

Please sign in to comment.