From a428dcd3d732760e3ea0d63c9e0d1e85a65ccca1 Mon Sep 17 00:00:00 2001 From: GrandpaGameHacker Date: Sun, 27 Aug 2023 00:31:19 +1000 Subject: [PATCH] fixed release crash --- ClassDumper3.cpp | 14 +++++--------- ClassDumper3.vcxproj | 7 +++++-- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/ClassDumper3.cpp b/ClassDumper3.cpp index 1557592..7561744 100644 --- a/ClassDumper3.cpp +++ b/ClassDumper3.cpp @@ -83,9 +83,11 @@ void ClassDumper3::GUILoop() if (done) break; DXApp.CreateFrame(); - for (std::shared_ptr window : IWindow::WindowList) + // Get a copy of the list incase we add one during draw + std::vector> WindowListCopy = IWindow::WindowList; + for (auto& Window : WindowListCopy) { - window->Tick(); + Window->Tick(); } DXApp.RenderFrame(); } @@ -141,13 +143,7 @@ void ClassDumper3::ClearLog() LogWnd->Clear(); } -int main() -{ - ClassDumper3 Dumper; - Dumper.Run(); -} - -int WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) +int APIENTRY WinMain(HINSTANCE hInst, HINSTANCE hInstPrev, PSTR cmdline, int cmdshow) { ClassDumper3 Dumper; Dumper.Run(); diff --git a/ClassDumper3.vcxproj b/ClassDumper3.vcxproj index 1d565b8..d303505 100644 --- a/ClassDumper3.vcxproj +++ b/ClassDumper3.vcxproj @@ -87,7 +87,7 @@ MachineX86 true - Console + Windows @@ -103,7 +103,7 @@ MachineX86 true - Console + Windows true true @@ -132,6 +132,9 @@ stdc17 true + + Windows +