fix null pointer deref when cancelling ticket.db mounting

take 2
This commit is contained in:
aspargas2 2019-09-08 15:28:16 -04:00 committed by d0k3
parent 2ef408f4af
commit 398c7fd14c

View File

@ -138,8 +138,11 @@ u64 InitVTickDbDrive(void) { // prerequisite: ticket.db mounted as image
}
ScanTickDb(false, true);
if (!tick_info->n_entries) DeinitVTickDbDrive();
return (tick_info->n_entries) ? SYS_TICKDB : 0;
if (!tick_info->n_entries)
DeinitVTickDbDrive();
return tick_info ? SYS_TICKDB : 0;
}
u64 CheckVTickDbDrive(void) {