mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-04 10:16:24 +02:00
Add error handling for all possible failing of winrt::check_result (#8278)
This commit is contained in:
@@ -233,7 +233,16 @@ void OverlayWindow::enable()
|
||||
winkey_popup->apply_overlay_opacity(((float)overlayOpacity.value) / 100.0f);
|
||||
winkey_popup->set_theme(theme.value);
|
||||
target_state = std::make_unique<TargetState>(pressTime.value);
|
||||
winkey_popup->initialize();
|
||||
try
|
||||
{
|
||||
winkey_popup->initialize();
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
Logger::critical("Winkey popup failed to initialize");
|
||||
return;
|
||||
}
|
||||
|
||||
#if defined(DISABLE_LOWLEVEL_HOOKS_WHEN_DEBUGGED)
|
||||
const bool hook_disabled = IsDebuggerPresent();
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user