diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2010-09-22 11:24:47 +0900 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2010-09-22 11:24:47 +0900 |
commit | 1334c2fc9397b66167dd6f5f4a5a67c365cec512 (patch) | |
tree | 9d14e837a805de3a789b1ad1818ed6aa246a9c2a | |
parent | d8e5ae4d7d6b11cc0d4db4e5754efbbc1d3a5d64 (diff) | |
download | pacrunner-1334c2fc9397b66167dd6f5f4a5a67c365cec512.tar.gz |
Handle case where interface is not specified
-rw-r--r-- | src/mozjs.c | 3 |
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; |