From 49310426fc6cd8f18bbfc2e85a9ba9e0469c0a8f Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> Date: Wed, 15 Mar 2023 01:13:51 +0100 Subject: [PATCH] Fix VGui crash on S2 builds Fix crash caused in threading code; attempting to call a callback function. The callback ptr was assigned to uninitialized memory. Manual debugging revealed 'CEngineVGui::RenderStart' (semantic name) was causing the crash. Further research revealed that both 'CEngineVGui_RenderStart' and 'CEngineVGui::RenderEnd' weren't even necessary to draw the VGui debug overlays. These have been removed. --- r5dev/vgui/vgui_baseui_interface.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/r5dev/vgui/vgui_baseui_interface.cpp b/r5dev/vgui/vgui_baseui_interface.cpp index 58338a2a..609b7279 100644 --- a/r5dev/vgui/vgui_baseui_interface.cpp +++ b/r5dev/vgui/vgui_baseui_interface.cpp @@ -21,9 +21,7 @@ int CEngineVGui::Paint(CEngineVGui* thisptr, PaintMode_t mode) if (/*mode == PaintMode_t::PAINT_UIPANELS ||*/ mode == PaintMode_t::PAINT_INGAMEPANELS) // Render in-main menu and in-game. { - CEngineVGui_RenderStart(g_pVGuiSurface); g_pOverlay->Update(); - CEngineVGui_RenderEnd(); } return result;