diff options
Diffstat (limited to 'xmpp-vala/src/module/xep/0199_ping.vala')
-rw-r--r-- | xmpp-vala/src/module/xep/0199_ping.vala | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/xmpp-vala/src/module/xep/0199_ping.vala b/xmpp-vala/src/module/xep/0199_ping.vala index 74802be1..4902b0c7 100644 --- a/xmpp-vala/src/module/xep/0199_ping.vala +++ b/xmpp-vala/src/module/xep/0199_ping.vala @@ -12,7 +12,9 @@ namespace Xmpp.Xep.Ping { public void send_ping(XmppStream stream, string jid, owned OnResult? listener) { Iq.Stanza iq = new Iq.Stanza.get(new StanzaNode.build("ping", NS_URI).add_self_xmlns()); iq.to = jid; - stream.get_module(Iq.Module.IDENTITY).send_iq(stream, iq, (stream) => { listener(stream); }); + stream.get_module(Iq.Module.IDENTITY).send_iq(stream, iq, (stream) => { + if (listener != null) listener(stream); + }); } public override void attach(XmppStream stream) { |