[FancyZones] Crash on launch: fix exception handler (#14609)

* fix stacktrace logging

* init logger before exception handler

* wchar check
This commit is contained in:
Seraphima Zykova
2021-11-23 21:41:10 +03:00
committed by GitHub
parent 8743c2329e
commit bd0db76e31
2 changed files with 76 additions and 51 deletions

View File

@@ -25,9 +25,8 @@ const std::wstring instanceMutexName = L"Local\\PowerToys_FancyZones_InstanceMut
int WINAPI wWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, _In_ PWSTR lpCmdLine, _In_ int nCmdShow)
{
winrt::init_apartment();
InitUnhandledExceptionHandler_x64();
LoggerHelpers::init_logger(moduleName, internalPath, LogSettings::fancyZonesLoggerName);
InitUnhandledExceptionHandler_x64();
auto mutex = CreateMutex(nullptr, true, instanceMutexName.c_str());
if (mutex == nullptr)