diff --git a/core/stat.c b/core/stat.c
index 5f0b45b0df6d7138d77b30401593084611221c35..aebd794003782a1477568d4be7687d98a1108efe 100644
--- a/core/stat.c
+++ b/core/stat.c
@@ -110,6 +110,9 @@ stat_print(struct tbuf *buf)
 void
 stat_age(ev_timer *timer, int events __unused__)
 {
+	if (stats == NULL)
+		return;
+
 	for (int i = 0; stats[i].name != NULL; i++) {
 		for (int j = 0; j < SECS - 1; j++)
 			stats[i].value[j + 1] = stats[i].value[j];