diff options
| author | hwspeedy <ns@bigbear.dk> | 2024-04-05 09:56:10 +0200 | 
|---|---|---|
| committer | hwspeedy <ns@bigbear.dk> | 2024-04-05 09:56:10 +0200 | 
| commit | bdc849438d5d3b5314a8f70dbe220cc1c22cbb18 (patch) | |
| tree | 9ac0c06a8bd69fce4bf45309df7e318059f4a700 /modules | |
| parent | 6db52aabfbca3c41fc50032b9fa7d8ef7b9c16cf (diff) | |
FIX Json get array warning for non existing - check has member
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/benchmark.c | 4 | 
1 files changed, 2 insertions, 2 deletions
| diff --git a/modules/benchmark.c b/modules/benchmark.c index d4a39677..f3edd228 100644 --- a/modules/benchmark.c +++ b/modules/benchmark.c @@ -433,8 +433,8 @@ static GSList *benchmark_include_results_json(const gchar *path,      if (json_node_get_node_type(root) != JSON_NODE_OBJECT)  goto out;      JsonObject *results = json_node_get_object(root); -    if (results) { -        JsonArray *machines = json_object_get_array_member(results, benchmark); +    if ( results && json_object_has_member(results,benchmark) ) { +      JsonArray *machines = json_object_get_array_member(results, benchmark);          if (machines) {              struct append_machine_result_json_data data = { | 
