Catch when no host was specified a bit more gracefully.


git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4308 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/common/rfb/Hostname.h b/common/rfb/Hostname.h
index ebdf816..f70347f 100644
--- a/common/rfb/Hostname.h
+++ b/common/rfb/Hostname.h
@@ -28,6 +28,8 @@
   static void getHostAndPort(const char* hi, char** host, int* port, int basePort=5900) {
     CharArray portBuf;
     CharArray hostBuf;
+    if (hi == NULL)
+      throw rdr::Exception("NULL host specified");
     if (hi[0] == '[') {
       if (!strSplit(&hi[1], ']', &hostBuf.buf, &portBuf.buf))
         throw rdr::Exception("unmatched [ in host");