Browse Source

Weather: Terminate host process when widget is disabled

pull/886/head
Valentin Radu 4 years ago
parent
commit
8cec8a9892
  1. 3
      ep_weather_host/ep_weather_host.c

3
ep_weather_host/ep_weather_host.c

@ -537,6 +537,8 @@ ULONG STDMETHODCALLTYPE epw_Weather_Release(EPWeather* _this)
{ {
} }
TerminateProcess(GetCurrentProcess(), 0);
return(0); return(0);
} }
return value; return value;
@ -963,6 +965,7 @@ DWORD WINAPI epw_Weather_MainThread(EPWeather* _this)
} }
else if (dwRes == WAIT_ABANDONED_0 + 1 || dwRes == WAIT_OBJECT_0 + 1) else if (dwRes == WAIT_ABANDONED_0 + 1 || dwRes == WAIT_OBJECT_0 + 1)
{ {
if (dwRes == WAIT_OBJECT_0 + 1) ReleaseMutex(_this->hSignalKillSwitch);
CloseHandle(_this->hSignalKillSwitch); CloseHandle(_this->hSignalKillSwitch);
TerminateProcess(GetCurrentProcess(), 0); TerminateProcess(GetCurrentProcess(), 0);
} }

Loading…
Cancel
Save