aboutsummaryrefslogtreecommitdiff
path: root/modules/benchmark
diff options
context:
space:
mode:
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");