Fixed segmentation faults caused by NULL assignments to std::strings
This commit is contained in:
parent
58b69b912a
commit
b460d76698
|
@ -62,3 +62,9 @@ xcuserdata/
|
|||
*.ipa
|
||||
*.dSYM.zip
|
||||
*.dSYM
|
||||
|
||||
## Eclipse CDT generated files
|
||||
/.autotools
|
||||
/.cproject
|
||||
/config.log
|
||||
/.project
|
||||
|
|
|
@ -658,8 +658,16 @@ struct LastRom {
|
|||
int NDS_LoadROM(const char *filename, const char *physicalName, const char *logicalFilename)
|
||||
{
|
||||
lastRom.filename = filename;
|
||||
lastRom.physicalName = physicalName;
|
||||
lastRom.logicalFilename = logicalFilename;
|
||||
|
||||
if (physicalName != NULL )
|
||||
{
|
||||
lastRom.physicalName = physicalName;
|
||||
}
|
||||
|
||||
if (logicalFilename != NULL)
|
||||
{
|
||||
lastRom.logicalFilename = logicalFilename;
|
||||
}
|
||||
|
||||
int ret;
|
||||
char buf[MAX_PATH];
|
||||
|
@ -3137,4 +3145,4 @@ void TCommonSettings::GameHacks::apply()
|
|||
void TCommonSettings::GameHacks::clear()
|
||||
{
|
||||
memset(&flags,0,sizeof(flags));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue