aboutsummaryrefslogtreecommitdiffstats
path: root/win/winvnc
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2018-05-29 15:50:08 +0200
committerPierre Ossman <ossman@cendio.se>2018-05-29 15:50:08 +0200
commit8ee522a66e6d25aa1b89acb8a28c53cb63f781e5 (patch)
tree2df3e9bd238ba6b1bc34a887e0f800ce80c7e0d4 /win/winvnc
parent8750db35e8d2792b6d2063ccfc439c2854edd593 (diff)
downloadtigervnc-8ee522a66e6d25aa1b89acb8a28c53cb63f781e5.tar.gz
tigervnc-8ee522a66e6d25aa1b89acb8a28c53cb63f781e5.zip
Catch exceptions by reference
We use polymorphic exception objects, so catching by value invokes the copy constructor and stuff that we don't really want.
Diffstat (limited to 'win/winvnc')
-rw-r--r--win/winvnc/winvnc.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/win/winvnc/winvnc.cxx b/win/winvnc/winvnc.cxx
index 5623421b..43c852c4 100644
--- a/win/winvnc/winvnc.cxx
+++ b/win/winvnc/winvnc.cxx
@@ -172,13 +172,13 @@ static void processParams(int argc, char** argv) {
// Try to clean up earlier services we've had
try {
rfb::win32::unregisterService("WinVNC4");
- } catch (rdr::SystemException) {
+ } 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) {
+ } catch (rdr::SystemException&) {
}
if (rfb::win32::registerService(VNCServerService::Name,