1
0
forked from 0ad/0ad

Fix unused glooxwrapper variable following 61261d14fc, refs #2305, #5294, #5550.

The class didn't leak the m_Wrapped gloox Jingle for this program since
it's not set to owned, and it's not set to owned because gloox deletes
it.
It would have leaked if some other app would have used glooxwrapper with
owned = true, if gloox has a situation for that.

Differential Revision: https://code.wildfiregames.com/D2090
This was SVN commit r22764.
This commit is contained in:
elexis 2019-08-23 12:04:20 +00:00
parent e02afa279c
commit 4d77bd6542

View File

@ -637,7 +637,11 @@ namespace glooxwrapper
bool m_Owned;
public:
Jingle(const gloox::Jingle::Session::Jingle* wrapped, bool owned) : m_Wrapped(wrapped), m_Owned(owned) {}
~Jingle()
{
if (m_Owned)
delete m_Wrapped;
}
ICEUDP::Candidate getCandidate() const;
};