aboutsummaryrefslogtreecommitdiff
path: root/modules/benchmark
diff options
context:
space:
mode:
authorhwspeedy <ns@bigbear.dk>2024-02-27 20:12:05 +0100
committerhwspeedy <ns@bigbear.dk>2024-02-27 20:15:10 +0100
commit0b912e312d3a70e12e0dcc80998dcf11af60a09e (patch)
tree8510401a8264bb6bded4566aa36eb42db0276167 /modules/benchmark
parent6fb5658d93b3e2d630915410e9e7a29a986f061a (diff)
FIX Critical warnings for non JSON members
Diffstat (limited to 'modules/benchmark')
-rw-r--r--modules/benchmark/bench_results.c6
1 files changed, 4 insertions, 2 deletions
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");