Fixed Image notified destroy when invalid

Former-commit-id: 5c14f5356809454d15fc3abdcea1111635f2a2cf
This commit is contained in:
Lynix 2013-04-06 16:31:29 +02:00
parent 578523b4bf
commit f2942e2b3f
1 changed files with 5 additions and 2 deletions

View File

@ -315,10 +315,13 @@ bool NzImage::Create(nzImageType type, nzPixelFormat format, unsigned int width,
} }
void NzImage::Destroy() void NzImage::Destroy()
{
if (m_sharedImage != &emptyImage)
{ {
NotifyDestroy(); NotifyDestroy();
ReleaseImage(); ReleaseImage();
} }
}
bool NzImage::Fill(const NzColor& color) bool NzImage::Fill(const NzColor& color)
{ {