diff options
author | Pierre Ossman <ossman@cendio.se> | 2016-08-18 16:48:55 +0200 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2016-08-18 16:48:55 +0200 |
commit | c7860c2cb66f2752119a6557bd58a1c672b96716 (patch) | |
tree | fb6b225c2fa4bef715ac42cbcb3a0a278c1b496a /win | |
parent | 6ec09fe34b704157fe51908cbfe2723d4ab8ca9f (diff) | |
download | tigervnc-c7860c2cb66f2752119a6557bd58a1c672b96716.tar.gz tigervnc-c7860c2cb66f2752119a6557bd58a1c672b96716.zip |
Don't fail old service cleanup
Diffstat (limited to 'win')
-rw-r--r-- | win/winvnc/winvnc.cxx | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/win/winvnc/winvnc.cxx b/win/winvnc/winvnc.cxx index 57f9f3d4..aa41bcbf 100644 --- a/win/winvnc/winvnc.cxx +++ b/win/winvnc/winvnc.cxx @@ -170,8 +170,16 @@ static void processParams(int argc, char** argv) { i = argc; // Try to clean up earlier services we've had - rfb::win32::unregisterService("WinVNC4"); - rfb::win32::unregisterService("TigerVNC Server"); + try { + rfb::win32::unregisterService("WinVNC4"); + } catch (rdr::SystemException) { + // Do nothing as we might fail simply because there was no + // service to remove + } + try { + rfb::win32::unregisterService("TigerVNC Server"); + } catch (rdr::SystemException) { + } if (rfb::win32::registerService(VNCServerService::Name, _T("TigerVNC Server"), |