IOS: fix crash when closing invalid file descriptor
This regression was introduced in 5.0-20284.
This commit is contained in:
parent
f79c88f30b
commit
77a1eaa740
|
@ -654,7 +654,7 @@ std::shared_ptr<Device> EmulationKernel::GetDeviceByName(std::string_view device
|
||||||
return iterator != m_device_map.end() ? iterator->second : nullptr;
|
return iterator != m_device_map.end() ? iterator->second : nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::shared_ptr<Device> EmulationKernel::GetDeviceByFileDescriptor(const int fd)
|
std::shared_ptr<Device> EmulationKernel::GetDeviceByFileDescriptor(const u32 fd)
|
||||||
{
|
{
|
||||||
if (fd < IPC_MAX_FDS)
|
if (fd < IPC_MAX_FDS)
|
||||||
return m_fdmap[fd];
|
return m_fdmap[fd];
|
||||||
|
|
|
@ -154,7 +154,7 @@ public:
|
||||||
// Get a resource manager by name.
|
// Get a resource manager by name.
|
||||||
// This only works for devices which are part of the device map.
|
// This only works for devices which are part of the device map.
|
||||||
std::shared_ptr<Device> GetDeviceByName(std::string_view device_name);
|
std::shared_ptr<Device> GetDeviceByName(std::string_view device_name);
|
||||||
std::shared_ptr<Device> GetDeviceByFileDescriptor(const int fd);
|
std::shared_ptr<Device> GetDeviceByFileDescriptor(const u32 fd);
|
||||||
|
|
||||||
std::shared_ptr<FSDevice> GetFSDevice();
|
std::shared_ptr<FSDevice> GetFSDevice();
|
||||||
std::shared_ptr<ESDevice> GetESDevice();
|
std::shared_ptr<ESDevice> GetESDevice();
|
||||||
|
|
Loading…
Reference in New Issue