Merge pull request #12309 from Tilka/ios_crash

IOS: fix crash when closing invalid file descriptor
This commit is contained in:
Tilka 2023-11-21 12:37:22 +00:00 committed by GitHub
commit 3a3a935b9a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -654,7 +654,7 @@ std::shared_ptr<Device> EmulationKernel::GetDeviceByName(std::string_view device
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)
return m_fdmap[fd];

View File

@ -154,7 +154,7 @@ public:
// Get a resource manager by name.
// 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> GetDeviceByFileDescriptor(const int fd);
std::shared_ptr<Device> GetDeviceByFileDescriptor(const u32 fd);
std::shared_ptr<FSDevice> GetFSDevice();
std::shared_ptr<ESDevice> GetESDevice();