Skip to content
Snippets Groups Projects
Commit 925fa848 authored by Simon McVittie's avatar Simon McVittie
Browse files

Merge branch 'wip/denittis/test_ci' into 'master'

graphics.c: Check for empty json file

See merge request steam/steam-runtime-tools!121
parents 280e8937 86b77f39
No related branches found
No related tags found
1 merge request!121graphics.c: Check for empty json file
Pipeline #2953 passed
......@@ -357,6 +357,14 @@ _srt_process_wflinfo (JsonParser *parser, const gchar **version_string, const gc
SrtGraphicsIssues issues = SRT_GRAPHICS_ISSUES_NONE;
JsonNode *node = json_parser_get_root (parser);
if (node == NULL)
{
g_debug ("The json output is empty");
issues |= SRT_GRAPHICS_ISSUES_CANNOT_LOAD;
return issues;
}
JsonObject *object = json_node_get_object (node);
JsonNode *sub_node = NULL;
JsonObject *sub_object = NULL;
......@@ -405,6 +413,14 @@ _srt_process_vulkaninfo (JsonParser *parser, gchar **new_version_string, const g
SrtGraphicsIssues issues = SRT_GRAPHICS_ISSUES_NONE;
JsonNode *node = json_parser_get_root (parser);
if (node == NULL)
{
g_debug ("The json output is empty");
issues |= SRT_GRAPHICS_ISSUES_CANNOT_LOAD;
return issues;
}
JsonObject *object = json_node_get_object (node);
JsonNode *sub_node = NULL;
JsonObject *sub_object = NULL;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment