Partially fix #8710.

- When an image was unloaded, its corresponding image info was never
  removed from TeamDebugInfo's list, leading to the latter containing
  a deleted object, resulting in various random crashes.
This commit is contained in:
Rene Gollent
2012-07-11 23:37:36 -04:00
parent c4120026a5
commit aeadcf457d
+4 -1
View File
@@ -26,8 +26,11 @@ Image::Image(Team* team,const ImageInfo& imageInfo, LocatableFile* imageFile)
Image::~Image()
{
if (fDebugInfo != NULL)
if (fDebugInfo != NULL) {
if (fTeam != NULL)
fTeam->DebugInfo()->RemoveImageDebugInfo(fDebugInfo);
fDebugInfo->ReleaseReference();
}
if (fImageFile != NULL)
fImageFile->ReleaseReference();
}