-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Maybe roster item should clear m_resources before copy them.
And the RosterItem::online() depends on m_resources.
Did I miss something ?
const RosterItem& RosterItem::operator = ( const RosterItem& o )
{
if (this == &o)
return *this;
m_subscription = o.m_subscription;
m_name = o.m_name;
m_jid = o.m_jid;
m_changed = o.m_changed;
// copy resources
// added begin
ResourceMap::iterator k = m_resources.begin();
for( ; k != m_resources.end(); ++k )
{
delete (*k).second;
(*k).second = 0;
}
m_resources.clear();
// added end
ResourceMap::const_iterator it = o.m_resources.begin();
for( ; it != o.m_resources.end(); ++it )
{
m_resources[(*it).first] = new
Resource((*it).second->priority(),
(*it).second->message(),
(*it).second->presence());
}
// copy group
m_groups = o.m_groups;
return *this;
}
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFHj/AFu3FNgZBi4vkRAqTIAJwN3MMwxWw8WrACND9jMMIX7dHZIQCghQNz
8iZv2gM85q6RzCkcC6QBhRw=
=I1YC
-----END PGP SIGNATURE-----