Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx> --- vdservice/vdservice.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vdservice/vdservice.cpp b/vdservice/vdservice.cpp index 12f7644..ef1ed9f 100644 --- a/vdservice/vdservice.cpp +++ b/vdservice/vdservice.cpp @@ -284,7 +284,7 @@ void VDService::handle_control_event() DWORD WINAPI VDService::control_handler(DWORD control, DWORD event_type, LPVOID event_data, LPVOID context) { - VDService* s = _singleton; + VDService* s = static_cast<VDService *>(context); DWORD ret = NO_ERROR; ASSERT(s); @@ -352,7 +352,7 @@ VOID WINAPI VDService::main(DWORD argc, TCHAR* argv[]) status->dwWaitHint = 0; #ifndef DEBUG_VDSERVICE s->_status_handle = RegisterServiceCtrlHandlerEx(VD_SERVICE_NAME, &VDService::control_handler, - NULL); + s); if (!s->_status_handle) { vd_printf("RegisterServiceCtrlHandler failed\n"); return; -- 2.7.4 _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel