From 906cc25379ab3823f12c644fd0529ad615e23912 Mon Sep 17 00:00:00 2001 From: joss17 Date: Sun, 31 Jan 2010 19:45:08 +0000 Subject: [PATCH] fix a null pointer bug git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2164 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- libretroshare/src/upnp/UPnPBase.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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()