Destroy the main UI and connection objects before popping up the fatal error
message. This avoids a lot of problems with recursion and trying to send
events over a dead socket.


git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4582 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/vncviewer/CConn.cxx b/vncviewer/CConn.cxx
index 31ceff1..e295c34 100644
--- a/vncviewer/CConn.cxx
+++ b/vncviewer/CConn.cxx
@@ -198,8 +198,7 @@
     exit_vncviewer();
   } catch (rdr::Exception& e) {
     vlog.error(e.str());
-    fl_alert(e.str());
-    exit_vncviewer();
+    exit_vncviewer(e.str());
   }
 
   recursing = false;