From bc961a13f54842aa1dd75a459fabfe98ccce2cad Mon Sep 17 00:00:00 2001 From: Mads Buvik Sandvei Date: Wed, 16 Dec 2020 22:03:16 +0100 Subject: [PATCH] avoid redundant calls to removeInitialDrawCallback --- apps/openmw/mwgui/loadingscreen.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/openmw/mwgui/loadingscreen.cpp b/apps/openmw/mwgui/loadingscreen.cpp index 2e2de578e..20586ef4a 100644 --- a/apps/openmw/mwgui/loadingscreen.cpp +++ b/apps/openmw/mwgui/loadingscreen.cpp @@ -365,8 +365,11 @@ namespace MWGui mViewer->renderingTraversals(); mViewer->advance(mViewer->getFrameStamp()->getSimulationTime()); - if(mCopyFramebufferToTextureCallback) + if (mCopyFramebufferToTextureCallback) + { mViewer->getCamera()->removeInitialDrawCallback(mCopyFramebufferToTextureCallback); + mCopyFramebufferToTextureCallback = nullptr; + } mLastRenderTime = mTimer.time_m(); }