aboutsummaryrefslogtreecommitdiff
path: root/src/lib/dispatch
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/dispatch')
-rw-r--r--src/lib/dispatch/dispatch_new.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/dispatch/dispatch_new.c b/src/lib/dispatch/dispatch_new.c
index 4467813064..d8e59d610a 100644
--- a/src/lib/dispatch/dispatch_new.c
+++ b/src/lib/dispatch/dispatch_new.c
@@ -34,7 +34,7 @@ max_in_u16_sl(const smartlist_t *sl, int dflt)
SMARTLIST_FOREACH_BEGIN(sl, uint16_t *, u) {
if (!maxptr)
maxptr = u;
- else if (*u > *maxptr)
+ else if (u && *u > *maxptr)
maxptr = u;
} SMARTLIST_FOREACH_END(u);