app: accept "revision" and "date" fields to be absent on a build...

... object in the gimp_versions.json file.
This commit is contained in:
Jehan 2020-02-06 22:15:11 +01:00
parent 0c1205f4c5
commit 7b3f696d9d
1 changed files with 4 additions and 2 deletions

View File

@ -198,8 +198,10 @@ gimp_check_updates_callback (GObject *source,
build_id = json_object_get_string_member (build, "build-id"); build_id = json_object_get_string_member (build, "build-id");
if (g_strcmp0 (build_id, GIMP_BUILD_ID) == 0) if (g_strcmp0 (build_id, GIMP_BUILD_ID) == 0)
{ {
build_revision = json_object_get_int_member (build, "revision"); if (json_object_has_member (build, "revision"))
build_date = json_object_get_string_member (build, "date"); build_revision = json_object_get_int_member (build, "revision");
if (json_object_has_member (build, "date"))
build_date = json_object_get_string_member (build, "date");
break; break;
} }
} }