Add check to prevent crash.

This commit is contained in:
Ghislain MARY 2013-01-17 11:32:00 +01:00
parent 3016ec37d0
commit 46ce83799e

View file

@ -107,6 +107,10 @@ void TunnelManager::addServer(const char *ip, int port,unsigned int udpMirrorPor
}
void TunnelManager::addServer(const char *ip, int port) {
if (ip == NULL) {
ip = "";
ms_warning("Adding tunnel server with empty ip, it will not work!");
}
mServerAddrs.push_back(ServerAddr(ip,port));
if (mTunnelClient) mTunnelClient->addServer(ip,port);
}