mirror of
https://github.com/PCSX2/pcsx2.git
synced 2026-07-11 01:34:17 +02:00
USB: Don't crash and burn if there is no ini file for pcsx2.
This commit is contained in:
@@ -115,6 +115,9 @@ public:
|
||||
|
||||
DeviceProxy* Device(int index)
|
||||
{
|
||||
if (index < 0)
|
||||
return nullptr; // Don't try to go backwards at the beginning of an iterator and crash and burn when pcsx2 is run for the first time.
|
||||
|
||||
auto it = registerDeviceMap.begin();
|
||||
std::advance(it, index);
|
||||
if (it != registerDeviceMap.end())
|
||||
|
||||
Reference in New Issue
Block a user