From 571e7f2c2c3ce3bbb2a1f41444264f86490748f8 Mon Sep 17 00:00:00 2001 From: Andrey Nekrasov Date: Wed, 3 Mar 2021 13:53:41 +0300 Subject: [PATCH] [ShortcutGuide] make SCG launching behavior a bit more deterministic (#10007) --- src/modules/shortcut_guide/native_event_waiter.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/modules/shortcut_guide/native_event_waiter.h b/src/modules/shortcut_guide/native_event_waiter.h index 14bf1a2d0d..d7dcaa603e 100644 --- a/src/modules/shortcut_guide/native_event_waiter.h +++ b/src/modules/shortcut_guide/native_event_waiter.h @@ -6,15 +6,14 @@ class NativeEventWaiter { static const int timeout = 1000; - HANDLE event_handle; - std::function action; - std::atomic aborting; + HANDLE event_handle = nullptr; + std::function action = nullptr; + std::atomic aborting = false; void run(); std::thread running_thread; public: - NativeEventWaiter(const std::wstring& event_name, std::function action); ~NativeEventWaiter(); };