aboutsummaryrefslogtreecommitdiff
path: root/xmpp-vala/src/module
diff options
context:
space:
mode:
authorhrxi <hrrrxi@gmail.com>2019-08-09 14:46:12 +0200
committerhrxi <hrrrxi@gmail.com>2019-08-09 14:46:58 +0200
commit34d7b5f515d120a80b8730dadb0a66326b8d0c4a (patch)
tree2daec92e99c5788c8592f23a71fbbcac412b7f86 /xmpp-vala/src/module
parent6494d7a45dabd180767890a310886146d83ae3be (diff)
downloaddino-34d7b5f515d120a80b8730dadb0a66326b8d0c4a.tar.gz
dino-34d7b5f515d120a80b8730dadb0a66326b8d0c4a.zip
Fix Jingle connection code when `cancellable` is `null`
Diffstat (limited to 'xmpp-vala/src/module')
-rw-r--r--xmpp-vala/src/module/xep/0166_jingle.vala9
1 files changed, 7 insertions, 2 deletions
diff --git a/xmpp-vala/src/module/xep/0166_jingle.vala b/xmpp-vala/src/module/xep/0166_jingle.vala
index 2e38b164..e0a96cc6 100644
--- a/xmpp-vala/src/module/xep/0166_jingle.vala
+++ b/xmpp-vala/src/module/xep/0166_jingle.vala
@@ -838,10 +838,15 @@ public class Connection : IOStream {
return;
}
SourceFunc callback = wait_and_check_for_errors.callback;
- ulong id = cancellable.connect(() => callback());
+ ulong id = 0;
+ if (cancellable != null) {
+ id = cancellable.connect(() => callback());
+ }
callbacks.add(new OnSetInnerCallback() { callback=(owned)callback, io_priority=io_priority});
yield;
- cancellable.disconnect(id);
+ if (cancellable != null) {
+ cancellable.disconnect(id);
+ }
}
}
private void handle_connection_error(IOError error) {