diff --git a/src/platform/Darwin/PlatformManagerImpl.cpp b/src/platform/Darwin/PlatformManagerImpl.cpp index e883f319305971..6102d1e599effc 100644 --- a/src/platform/Darwin/PlatformManagerImpl.cpp +++ b/src/platform/Darwin/PlatformManagerImpl.cpp @@ -55,7 +55,7 @@ CHIP_ERROR PlatformManagerImpl::_InitChipStack() mRunLoopSem = dispatch_semaphore_create(0); // Ensure there is a dispatch queue available - GetWorkQueue(); + static_cast(DeviceLayer::SystemLayer()).SetDispatchQueue(GetWorkQueue()); // Call _InitChipStack() on the generic implementation base class // to finish the initialization process. @@ -70,8 +70,6 @@ CHIP_ERROR PlatformManagerImpl::_InitChipStack() mStartTime = System::SystemClock().GetMonotonicTimestamp(); - static_cast(DeviceLayer::SystemLayer()).SetDispatchQueue(GetWorkQueue()); - exit: return err; }