From 14ad818465dcd095dc8ecf3dbc8cef082c5ceb6b Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 28 Feb 2023 16:10:39 +0300 Subject: fixes #3364 (Jabber: random crash) --- protocols/JabberG/src/jabber_voip.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'protocols') diff --git a/protocols/JabberG/src/jabber_voip.cpp b/protocols/JabberG/src/jabber_voip.cpp index ecd20612b5..27147af5f0 100644 --- a/protocols/JabberG/src/jabber_voip.cpp +++ b/protocols/JabberG/src/jabber_voip.cpp @@ -356,8 +356,9 @@ bool CJabberProto::VOIPTerminateSession(const char *reason) gst_print("Pipeline stopped\n"); } - if (reason && !m_voipSession.IsEmpty() && !m_voipPeerJid.IsEmpty()) { + if (m_ThreadInfo && reason && !m_voipSession.IsEmpty() && !m_voipPeerJid.IsEmpty()) { XmlNodeIq iq("set", SerialNext(), m_voipPeerJid); + TiXmlElement *jingleNode = iq << XCHILDNS("jingle", JABBER_FEAT_JINGLE); jingleNode << XATTR("action", "session-terminate") << XATTR("sid", m_voipSession); jingleNode << XATTR("initiator", m_isOutgoing ? m_ThreadInfo->fullJID : m_voipPeerJid); -- cgit v1.2.3