Don't invoke null callbacks in network requests
This commit is contained in:
parent
ff72381a3f
commit
bf2ae9d0bb
|
@ -97,6 +97,7 @@ public class Tootle.Network : GLib.Object {
|
||||||
started ();
|
started ();
|
||||||
msg.finished.connect (() => {
|
msg.finished.connect (() => {
|
||||||
if (msg.status_code != Soup.Status.CANCELLED) {
|
if (msg.status_code != Soup.Status.CANCELLED) {
|
||||||
|
if (cb != null)
|
||||||
cb (session, msg);
|
cb (session, msg);
|
||||||
msg.request_body.free ();
|
msg.request_body.free ();
|
||||||
msg.response_body.free ();
|
msg.response_body.free ();
|
||||||
|
|
Loading…
Reference in New Issue