Fix null-dereferencing error in EXI_DeviceMemoryCard.cpp;

Make wx projects build for 64-bit JITIL configuration

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3435 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Nolan Check 2009-06-14 03:29:58 +00:00
parent ecf073ee15
commit 7812b2a231
2 changed files with 11 additions and 3 deletions

View File

@ -42,7 +42,8 @@ void CEXIMemoryCard::FlushCallback(u64 userdata, int cyclesLate)
CEXIMemoryCard::CEXIMemoryCard(const std::string& _rName, const std::string& _rFilename, int _card_index) :
m_strFilename(_rFilename),
card_index(_card_index)
card_index(_card_index),
flushThread(NULL)
{
cards[_card_index] = this;
et_this_card = CoreTiming::RegisterEvent(_rName.c_str(), FlushCallback);
@ -98,7 +99,6 @@ CEXIMemoryCard::CEXIMemoryCard(const std::string& _rName, const std::string& _rF
WARN_LOG(EXPANSIONINTERFACE, "No memory card found. Will create new.");
Flush();
}
flushThread = NULL;
}
THREAD_RETURN innerFlush(void *pArgs)
@ -139,7 +139,10 @@ THREAD_RETURN innerFlush(void *pArgs)
void CEXIMemoryCard::Flush(bool exiting)
{
if(flushThread)
{
delete flushThread;
flushThread = NULL;
}
if(!exiting)
Core::DisplayMessage(StringFromFormat("Writing to memory card %c", card_index ? 'B' : 'A'), 1000);
@ -162,8 +165,10 @@ CEXIMemoryCard::~CEXIMemoryCard()
delete [] memory_card_content;
memory_card_content = NULL;
if(flushThread)
{
delete flushThread;
flushThread = NULL;
flushThread = NULL;
}
}
bool CEXIMemoryCard::IsPresent()

View File

@ -495,6 +495,7 @@ Global
{1C8436C9-DBAF-42BE-83BC-CF3EC9175ABE}.Release_JITIL|Win32.ActiveCfg = Release|Win32
{1C8436C9-DBAF-42BE-83BC-CF3EC9175ABE}.Release_JITIL|Win32.Build.0 = Release|Win32
{1C8436C9-DBAF-42BE-83BC-CF3EC9175ABE}.Release_JITIL|x64.ActiveCfg = Release|x64
{1C8436C9-DBAF-42BE-83BC-CF3EC9175ABE}.Release_JITIL|x64.Build.0 = Release|x64
{1C8436C9-DBAF-42BE-83BC-CF3EC9175ABE}.Release|Win32.ActiveCfg = Release|Win32
{1C8436C9-DBAF-42BE-83BC-CF3EC9175ABE}.Release|Win32.Build.0 = Release|Win32
{1C8436C9-DBAF-42BE-83BC-CF3EC9175ABE}.Release|x64.ActiveCfg = Release|x64
@ -509,6 +510,7 @@ Global
{0E231FB1-F3C9-4724-ACCB-DE8BCB3C089E}.Release_JITIL|Win32.ActiveCfg = Release|Win32
{0E231FB1-F3C9-4724-ACCB-DE8BCB3C089E}.Release_JITIL|Win32.Build.0 = Release|Win32
{0E231FB1-F3C9-4724-ACCB-DE8BCB3C089E}.Release_JITIL|x64.ActiveCfg = Release|x64
{0E231FB1-F3C9-4724-ACCB-DE8BCB3C089E}.Release_JITIL|x64.Build.0 = Release|x64
{0E231FB1-F3C9-4724-ACCB-DE8BCB3C089E}.Release|Win32.ActiveCfg = Release|Win32
{0E231FB1-F3C9-4724-ACCB-DE8BCB3C089E}.Release|Win32.Build.0 = Release|Win32
{0E231FB1-F3C9-4724-ACCB-DE8BCB3C089E}.Release|x64.ActiveCfg = Release|x64
@ -523,6 +525,7 @@ Global
{11F55366-12EC-4C44-A8CB-1D4E315D61ED}.Release_JITIL|Win32.ActiveCfg = Release|Win32
{11F55366-12EC-4C44-A8CB-1D4E315D61ED}.Release_JITIL|Win32.Build.0 = Release|Win32
{11F55366-12EC-4C44-A8CB-1D4E315D61ED}.Release_JITIL|x64.ActiveCfg = Release|x64
{11F55366-12EC-4C44-A8CB-1D4E315D61ED}.Release_JITIL|x64.Build.0 = Release|x64
{11F55366-12EC-4C44-A8CB-1D4E315D61ED}.Release|Win32.ActiveCfg = Release|Win32
{11F55366-12EC-4C44-A8CB-1D4E315D61ED}.Release|Win32.Build.0 = Release|Win32
{11F55366-12EC-4C44-A8CB-1D4E315D61ED}.Release|x64.ActiveCfg = Release|x64