aboutsummaryrefslogtreecommitdiff
path: root/xmpp-vala
diff options
context:
space:
mode:
Diffstat (limited to 'xmpp-vala')
-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) {