From 0b912e312d3a70e12e0dcc80998dcf11af60a09e Mon Sep 17 00:00:00 2001 From: hwspeedy Date: Tue, 27 Feb 2024 20:12:05 +0100 Subject: FIX Critical warnings for non JSON members --- modules/benchmark/bench_results.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'modules') diff --git a/modules/benchmark/bench_results.c b/modules/benchmark/bench_results.c index 18ed0739..e0557fc2 100644 --- a/modules/benchmark/bench_results.c +++ b/modules/benchmark/bench_results.c @@ -354,8 +354,10 @@ static void append_cpu_config(JsonObject *object, static gchar *get_cpu_config(JsonObject *machine) { - JsonObject *cpu_config_map = - json_object_get_object_member(machine, "CpuConfigMap"); + JsonObject *cpu_config_map=NULL; + + if(json_object_has_member(machine, "CpuConfigMap")) + cpu_config_map=json_object_get_object_member(machine, "CpuConfigMap"); if (!cpu_config_map) return json_get_string_dup(machine, "CpuConfig"); -- cgit v1.2.3