ImguiSystem: don't run the message handler if the system isn't initialized

ImGui_ImplWin32_WndProcHandler will return out early anyways if Dear Imgui itself isn't initialized, there is therefore no need to lock any mutex here when the system isn't initialized. Return out early.
This commit is contained in:
Kawe Mazidjatari 2024-11-14 23:30:08 +01:00
parent a331d43488
commit fa949c8e6a

View File

@ -163,6 +163,9 @@ void CImguiSystem::RenderFrame()
//-----------------------------------------------------------------------------
LRESULT CImguiSystem::MessageHandler(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
if (ImguiSystem()->m_systemInitState == ImguiSystemInitStage_e::IM_PENDING_INIT)
return NULL;
AUTO_LOCK(ImguiSystem()->m_inputEventQueueMutex);
extern IMGUI_IMPL_API LRESULT ImGui_ImplWin32_WndProcHandler(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);