mirror of
https://github.com/PCSX2/pcsx2.git
synced 2026-11-17 19:44:19 +01:00
USB: Don't crash and burn if there is no ini file for pcsx2.
This commit is contained in:
1 parent
8cf430ef7e
commit
c46d316e95
1 file changed
+3
@@ -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