fixed crash when spectrum receives xmpp ping from another server

This commit is contained in:
Vitaly Takmazov 2013-05-28 20:05:42 +04:00
parent 952133a35b
commit 40f2a8696b

View file

@ -1077,7 +1077,11 @@ void NetworkPluginServer::handleElement(boost::shared_ptr<Swift::Element> elemen
}
else {
Swift::Presence::ref highest = m_component->getPresenceOracle()->getHighestPriorityPresence(user->getJID());
iq->setTo(highest->getFrom());
if (highest) {
iq->setTo(highest->getFrom());
} else {
iq->setTo(user->getJID());
}
}
m_component->getIQRouter()->sendIQ(iq);
return;