maple: don't crash on invalid maple device. Just ignore it

Fixes MINIDUMP-A9C
This commit is contained in:
Flyinghead committed 2026-10-12 09:42:20 +02:00
1 parent fa3c526e4f
commit 658abb386a
2 files changed
+2 -2

No files matched your search

+2 -1
View File
@@ -227,7 +227,8 @@ static void mcfg_Create(MapleDeviceType type, u32 bus, u32 port, s32 player_num
}
}
std::shared_ptr<maple_device> dev = maple_Create(type);
dev->Setup(bus, port, player_num);
if (dev != nullptr)
dev->Setup(bus, port, player_num);
}
static void createNaomiDevices()
-1
View File
@@ -1891,7 +1891,6 @@ std::shared_ptr<maple_device> maple_Create(MapleDeviceType type)
default:
ERROR_LOG(MAPLE, "Invalid device type %d", type);
die("Invalid maple device type");
break;
}
return nullptr;