aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2010-09-22 11:24:47 +0900
committerMarcel Holtmann <marcel@holtmann.org>2010-09-22 11:24:47 +0900
commit1334c2fc9397b66167dd6f5f4a5a67c365cec512 (patch)
tree9d14e837a805de3a789b1ad1818ed6aa246a9c2a
parentd8e5ae4d7d6b11cc0d4db4e5754efbbc1d3a5d64 (diff)
downloadpacrunner-1334c2fc9397b66167dd6f5f4a5a67c365cec512.tar.gz
Handle case where interface is not specified
-rw-r--r--src/mozjs.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mozjs.c b/src/mozjs.c
index 14485ec..ab4606e 100644
--- a/src/mozjs.c
+++ b/src/mozjs.c
@@ -156,6 +156,9 @@ static JSBool myipaddress(JSContext *ctx, JSObject *obj, uintN argc,
*rval = JSVAL_NULL;
+ if (current_interface == NULL)
+ return TRUE;
+
if (getaddr(current_interface, address, sizeof(address)) < 0)
return TRUE;