1
0
mirror of https://gitlab.gnome.org/World/tootle synced 2025-02-08 15:48:41 +01:00

Don't invoke null callbacks in network requests

This commit is contained in:
Joshua Elsasser 2019-03-09 01:36:09 -08:00 committed by Bleak Grey
parent ff72381a3f
commit bf2ae9d0bb

View File

@ -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 ();