summaryrefslogtreecommitdiffstats
path: root/src/squark-auth-ip.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/squark-auth-ip.c')
-rw-r--r--src/squark-auth-ip.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/squark-auth-ip.c b/src/squark-auth-ip.c
index 38e1f0b..9b6ab15 100644
--- a/src/squark-auth-ip.c
+++ b/src/squark-auth-ip.c
@@ -49,7 +49,7 @@ static void handle_line(blob_t line)
if (addr_parse(ipaddr, &addr)) {
token = authdb_get(&adb, &addr, &entry, 1);
- if (authdb_check_login(token, &entry, BLOB_NULL, now, &adbc))
+ if (token != NULL && authdb_check_login(token, &entry, BLOB_NULL, now, &adbc))
auth_ok = 1;
}