From 5533ac9b7fcfaac2f0b33dbe7af38f2d81825801 Mon Sep 17 00:00:00 2001 From: Shawn Hoffman Date: Tue, 24 Mar 2009 23:58:32 +0000 Subject: [PATCH] fix crash that could happen when closing ISOProperties on a wii disc git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2750 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/DolphinWX/Src/ISOProperties.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Source/Core/DolphinWX/Src/ISOProperties.cpp b/Source/Core/DolphinWX/Src/ISOProperties.cpp index b2cbe7f08e..ca9fac7807 100644 --- a/Source/Core/DolphinWX/Src/ISOProperties.cpp +++ b/Source/Core/DolphinWX/Src/ISOProperties.cpp @@ -172,9 +172,12 @@ CISOProperties::CISOProperties(const std::string fileName, wxWindow* parent, wxW CISOProperties::~CISOProperties() { - delete pFileSystem; - delete OpenISO; - WiiDisc.clear(); + if (IsVolumeWiiDisc(OpenISO)) + WiiDisc.clear(); + else + delete pFileSystem; + + delete OpenISO; } void CISOProperties::CreateDirectoryTree(wxTreeItemId& parent,