Skip to content

Commit e59a7ac

Browse files
committed
OSDHistory: dont save record if ID is NULL
1 parent 39f7970 commit e59a7ac

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/OSDHistory.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,11 @@ static u16 GetTimestamp(void)
229229
static void AddHistoryRecord(const char *name)
230230
{
231231
DPRINTF("%s: start\n", __func__);
232+
if (name == NULL)
233+
{
234+
DPRINTF("GAME ID IS NULL, ABORTING.\n");
235+
return;
236+
}
232237
int i, value, LeastUsedRecord, LeastUsedRecordLaunchCount, LeastUsedRecordTimestamp, NewLaunchCount;
233238
u8 BlankSlotList[MAX_HISTORY_ENTRIES];
234239
int IsNewRecord;

0 commit comments

Comments
 (0)