summaryrefslogtreecommitdiff
path: root/src/win32
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2019-05-29 21:22:25 +0200
committerMax Kellermann <max@musicpd.org>2019-05-29 21:22:25 +0200
commit71a5c8b8196ad8c09d74f0cbc55cc127f401a242 (patch)
treec89cfe1c45924f887533bf3e3364059fd29561aa /src/win32
parent620a39afb4f68291816a98e1f831f2658b5bec17 (diff)
Main: allocate Instance on the stack
Diffstat (limited to 'src/win32')
-rw-r--r--src/win32/Win32Main.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/win32/Win32Main.cxx b/src/win32/Win32Main.cxx
index 4f66ecb53..b7a57b268 100644
--- a/src/win32/Win32Main.cxx
+++ b/src/win32/Win32Main.cxx
@@ -70,7 +70,7 @@ service_dispatcher(gcc_unused DWORD control, gcc_unused DWORD event_type,
switch (control) {
case SERVICE_CONTROL_SHUTDOWN:
case SERVICE_CONTROL_STOP:
- instance->Break();
+ global_instance->Break();
return NO_ERROR;
default:
return NO_ERROR;
@@ -106,7 +106,7 @@ console_handler(DWORD event)
// regardless our thread is still active.
// If this did not happen within 3 seconds
// let's shutdown anyway.
- instance->Break();
+ global_instance->Break();
// Under debugger it's better to wait indefinitely
// to allow debugging of shutdown code.
Sleep(IsDebuggerPresent() ? INFINITE : 3000);