From abf60753cb4671099053e6ad8a8c90535d66ccdc Mon Sep 17 00:00:00 2001 From: Michael Muesch Date: Tue, 25 Jun 2019 13:24:31 -0400 Subject: [PATCH] Remove assert from deconstructor of run_loop.cpp In the deconstructor of run_loop.cpp there is an assert that checks to make sure the Scheduler is null before setting it to null. In some rare scenarios where the app is being put into the background or closed the Scheduler can be null before the deconsturctor is called. This can cause an unnecessary crash. Since the goal here is to just set the Scheduler to null either way, it should not matter what the state of the Scheduler is before the function call. --- platform/darwin/src/run_loop.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/platform/darwin/src/run_loop.cpp b/platform/darwin/src/run_loop.cpp index 76f469b22..0e22dc9e3 100644 --- a/platform/darwin/src/run_loop.cpp +++ b/platform/darwin/src/run_loop.cpp @@ -25,7 +25,6 @@ RunLoop::RunLoop(Type) } RunLoop::~RunLoop() { - assert(Scheduler::GetCurrent()); Scheduler::SetCurrent(nullptr); }