Skip to content
Snippets Groups Projects
Commit 6ed1fa48 authored by Yuriy Vostrikov's avatar Yuriy Vostrikov
Browse files

[core] Do not SEGV if no statitics collected.

parent cc7d6e19
No related branches found
No related tags found
No related merge requests found
...@@ -108,6 +108,9 @@ stat_print(struct tbuf *buf) ...@@ -108,6 +108,9 @@ stat_print(struct tbuf *buf)
void void
stat_age(ev_timer *timer, int events __unused__) stat_age(ev_timer *timer, int events __unused__)
{ {
if (stats == NULL)
return;
for (int i = 0; i <= stats_max; i++) { for (int i = 0; i <= stats_max; i++) {
if (stats[i].name == NULL) if (stats[i].name == NULL)
continue; continue;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment