diff --git a/libretroshare/src/upnp/UPnPBase.cpp b/libretroshare/src/upnp/UPnPBase.cpp index 76b3c2016..827195419 100644 --- a/libretroshare/src/upnp/UPnPBase.cpp +++ b/libretroshare/src/upnp/UPnPBase.cpp @@ -1026,7 +1026,11 @@ error: char* CUPnPControlPoint::getInternalIpAddress() { - return UpnpGetServerIpAddress(); + char * addr = UpnpGetServerIpAddress(); + if (addr = NULL) { + addr = "127.0.0.1"; + } + return addr; } CUPnPControlPoint::~CUPnPControlPoint()