From bf2ae9d0bb8e22e94ec2bbd4127d3f4564fcacf1 Mon Sep 17 00:00:00 2001 From: Joshua Elsasser Date: Sat, 9 Mar 2019 01:36:09 -0800 Subject: [PATCH] Don't invoke null callbacks in network requests --- src/Network.vala | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Network.vala b/src/Network.vala index 71bf7e0..b364d05 100644 --- a/src/Network.vala +++ b/src/Network.vala @@ -97,7 +97,8 @@ public class Tootle.Network : GLib.Object { started (); msg.finished.connect (() => { if (msg.status_code != Soup.Status.CANCELLED) { - cb (session, msg); + if (cb != null) + cb (session, msg); msg.request_body.free (); msg.response_body.free (); msg.request_headers.free ();