Add a check to make sure internal chart state is initialized
Stelios Fragkakis committed
Feb 25, 2022 at 14:49 UTC
e376fb8ca490b1e9b788fa3cd107e488d9a36028
1 file changed
+1
-1
web/api/formatters/rrd2json.c
+1
-1
@@ -229,7 +229,7 @@ int rrdset2anything_api_v1(
229
return HTTP_RESP_INTERNAL_SERVER_ERROR;
230
}
231
232
- if (st && st->state->is_ar_chart)
232
+ if (st && st->state && st->state->is_ar_chart)
233
ml_process_rrdr(r, max_anomaly_rates);
234
235
RRDDIM *temp_rd = context_param_list ? context_param_list->rd : NULL;