Fix crash on close while detecting devices

This commit is contained in:
Térence Clastres 2020-08-06 18:19:59 +02:00 committed by Adam Honse
parent 06b2cd87c6
commit f8af9980fd
4 changed files with 21 additions and 0 deletions

View file

@ -44,6 +44,8 @@ public:
void DetectDevicesThreadFunction();
void WaitForDeviceDetection();
private:
static std::unique_ptr<ResourceManager> instance;
@ -60,6 +62,8 @@ private:
std::thread * DetectDevicesThread;
std::mutex DetectDeviceMutex;
std::mutex DeviceListChangeMutex;
std::vector<ResourceManagerCallback> DeviceListChangeCallbacks;
std::vector<void *> DeviceListChangeCallbackArgs;