mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-09-12 22:43:07 -06:00
fix possible crash in SD/MMC code
This commit is contained in:
@ -287,8 +287,10 @@ void DSi_SDHost::SetCardIRQ()
|
||||
u16 oldflags = CardIRQStatus & ~CardIRQMask;
|
||||
DSi_SDDevice* dev = Ports[PortSelect & 0x1].get();
|
||||
|
||||
if (dev->IRQ) CardIRQStatus |= (1<<0);
|
||||
else CardIRQStatus &= ~(1<<0);
|
||||
if (dev && dev->IRQ)
|
||||
CardIRQStatus |= (1<<0);
|
||||
else
|
||||
CardIRQStatus &= ~(1<<0);
|
||||
|
||||
u16 newflags = CardIRQStatus & ~CardIRQMask;
|
||||
|
||||
|
Reference in New Issue
Block a user