From 6797f00d239225be26aa601ed688c48c10381a47 Mon Sep 17 00:00:00 2001 From: rogerman Date: Fri, 10 Aug 2018 18:53:00 -0700 Subject: [PATCH] Windows Port: Oops! Fix a bug that will cause the app to crash on app exit. (Regression from commit 5e67e9c.) --- desmume/src/frontend/windows/main.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/desmume/src/frontend/windows/main.cpp b/desmume/src/frontend/windows/main.cpp index 2be481052..98f0885f9 100755 --- a/desmume/src/frontend/windows/main.cpp +++ b/desmume/src/frontend/windows/main.cpp @@ -3557,6 +3557,11 @@ int _main() gdbstub_mutex_destroy(); #endif + if (wifiHandler->IsSocketsSupported()) + { + WSACleanup(); + } + NDS_DeInit(); #ifdef DEBUG @@ -3591,11 +3596,6 @@ int _main() UnregWndClass("DeSmuME"); - if (wifiHandler->IsSocketsSupported()) - { - WSACleanup(); - } - return 0; }