From ef0b4177b57fd6ed8d3b24467fa88703c0a6f279 Mon Sep 17 00:00:00 2001 From: Michael Catanzaro Date: Sat, 11 Jan 2020 14:51:36 -0600 Subject: sync: don't crash when message body is empty I started getting crashes here after I uninstalled glib-networking in my jhbuild environment. --- lib/sync/ephy-sync-service.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/sync/ephy-sync-service.c b/lib/sync/ephy-sync-service.c index 24f5f433d..35e2ccc87 100644 --- a/lib/sync/ephy-sync-service.c +++ b/lib/sync/ephy-sync-service.c @@ -919,6 +919,11 @@ get_signed_certificate_cb (SoupSession *session, const char *message = NULL; const char *certificate = NULL; + if (!msg->response_body || !msg->response_body->data) { + g_warning ("No response body"); + goto out_error; + } + node = json_from_string (msg->response_body->data, &error); if (error) { g_warning ("Response is not a valid JSON: %s", error->message); -- cgit v1.2.1