From 7c00fe87c434b97b6b8bbe987815e1f869d748c7 Mon Sep 17 00:00:00 2001 From: Brian Fiete Date: Tue, 21 Jun 2022 11:31:51 -0700 Subject: [PATCH] Fixed update-after-shutdown issue --- BeefySysLib/BFApp.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BeefySysLib/BFApp.cpp b/BeefySysLib/BFApp.cpp index d95c0907..6b50391f 100644 --- a/BeefySysLib/BFApp.cpp +++ b/BeefySysLib/BFApp.cpp @@ -222,7 +222,7 @@ void BFApp::Process() mClientUpdateCntF = mUpdateCntF - 1; } - while ((int)mClientUpdateCntF < (int)mUpdateCntF) + while ((mRunning) && ((int)mClientUpdateCntF < (int)mUpdateCntF)) { Update(didUpdateCnt == 0); didUpdateCnt++; @@ -232,7 +232,7 @@ void BFApp::Process() } // Only attempt UpdateF updates if our rates aren't nearly the same - if ((mRefreshRate != 0) && (fabs(physRefreshRate - mRefreshRate) / (float)mRefreshRate > 0.1f)) + if ((mRunning) && (mRefreshRate != 0) && (fabs(physRefreshRate - mRefreshRate) / (float)mRefreshRate > 0.1f)) { float updateFAmt = (float)(mUpdateCntF - mClientUpdateCntF); if ((updateFAmt > 0.05f) && (updateFAmt < 1.0f) && (didUpdateCnt < maxUpdates))