Commit b7dae538 authored by dscho's avatar dscho

argc and argv may be zero (which means to ignore them)

parent e78a41c6
......@@ -188,6 +188,11 @@ static rfbBool rfbInitConnection(rfbClient* client)
rfbBool rfbInitClient(rfbClient* client,int* argc,char** argv) {
int i,j;
if(argv==0 || argc==0 || *argc==0) {
client->programName="";
client->serverHost="";
client->serverPort=5900;
} else {
if(client->programName==0)
client->programName=argv[0];
......@@ -222,6 +227,7 @@ rfbBool rfbInitClient(rfbClient* client,int* argc,char** argv) {
i--;
}
}
}
if(!rfbInitConnection(client)) {
rfbClientCleanup(client);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment