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:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user