summaryrefslogtreecommitdiff
path: root/node/Path.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'node/Path.hpp')
-rw-r--r--node/Path.hpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/node/Path.hpp b/node/Path.hpp
index 5b966f6b..f0198bde 100644
--- a/node/Path.hpp
+++ b/node/Path.hpp
@@ -158,7 +158,9 @@ public:
{
memset(_ifname, 0, 16);
memset(_addrString, 0, sizeof(_addrString));
- _phy->getIfName((PhySocket *)((uintptr_t)_localSocket), _ifname, 16);
+ if (_localSocket != -1) {
+ _phy->getIfName((PhySocket *) ((uintptr_t) _localSocket), _ifname, 16);
+ }
}
/**