Skip to content

Commit 2bc7e63

Browse files
committed
Fix mac crash
1 parent 5ba0448 commit 2bc7e63

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

ResourceManager.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,10 @@ ResourceManager::ResourceManager()
120120
detection_percent = 100;
121121
detection_string = "";
122122
detection_is_required = false;
123+
<<<<<<< HEAD
124+
=======
125+
DetectDevicesThread = nullptr;
126+
>>>>>>> 86ad1582 (Fix mac crash)
123127
dynamic_detectors_processed = false;
124128
init_finished = false;
125129
background_thread_running = true;
@@ -227,6 +231,7 @@ ResourceManager::ResourceManager()
227231
ResourceManager::~ResourceManager()
228232
{
229233
Cleanup();
234+
<<<<<<< HEAD
230235

231236
// Mark the background detection thread as not running
232237
// And then wake it up so it knows that it has to stop
@@ -240,6 +245,8 @@ ResourceManager::~ResourceManager()
240245
delete DetectDevicesThread;
241246
DetectDevicesThread = nullptr;
242247
}
248+
=======
249+
>>>>>>> 86ad1582 (Fix mac crash)
243250
}
244251

245252
void ResourceManager::RegisterI2CBus(i2c_smbus_interface *bus)
@@ -1665,11 +1672,14 @@ void ResourceManager::Initialize(bool tryConnect, bool detectDevices, bool start
16651672
start_server = startServer;
16661673
apply_post_options = applyPostOptions;
16671674

1675+
<<<<<<< HEAD
16681676
RunInBackgroundThread(std::bind(&ResourceManager::InitCoroutine, this));
16691677
}
16701678

16711679
void ResourceManager::InitCoroutine()
16721680
{
1681+
=======
1682+
>>>>>>> 86ad1582 (Fix mac crash)
16731683
if(tryAutoConnect)
16741684
{
16751685
detection_percent = 0;

ResourceManager.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,11 @@ class ResourceManager: public ResourceManagerInterface
290290
/*-------------------------------------------------------------------------------------*\
291291
| Detection Thread and Detection State |
292292
\*-------------------------------------------------------------------------------------*/
293+
<<<<<<< HEAD
293294
std::thread * DetectDevicesThread;
295+
=======
296+
std::thread * DetectDevicesThread; // Used for rescan
297+
>>>>>>> 86ad1582 (Fix mac crash)
294298
std::mutex DetectDeviceMutex;
295299
std::function<void()> ScheduledBackgroundFunction;
296300
std::mutex BackgroundThreadStateMutex;

ResourceManager.o

129 KB
Binary file not shown.

0 commit comments

Comments
 (0)