diff options
author | Remko Tronçon <git@el-tramo.be> | 2010-03-28 13:36:48 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2010-03-28 13:36:48 (GMT) |
commit | dae28dd45e43fc6e6ef2ec4c6c65d5d736ed86f8 (patch) | |
tree | f01fe3ff891a815b7c7db511ddbabcc67f916445 /Swiften/Avatars/AvatarManager.cpp | |
parent | a7d213975040a1130ac136d61a055c5b6f5d41fa (diff) | |
parent | a59af6c6daa72dd491189335cf2d255a788eb0f6 (diff) | |
download | swift-contrib-dae28dd45e43fc6e6ef2ec4c6c65d5d736ed86f8.zip swift-contrib-dae28dd45e43fc6e6ef2ec4c6c65d5d736ed86f8.tar.bz2 |
Merge commit 'origin/master'
Conflicts:
BuildTools
Diffstat (limited to 'Swiften/Avatars/AvatarManager.cpp')
-rw-r--r-- | Swiften/Avatars/AvatarManager.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Swiften/Avatars/AvatarManager.cpp b/Swiften/Avatars/AvatarManager.cpp index 42451af..3825ffd 100644 --- a/Swiften/Avatars/AvatarManager.cpp +++ b/Swiften/Avatars/AvatarManager.cpp @@ -27,6 +27,10 @@ AvatarManager::~AvatarManager() { } +void AvatarManager::setMUCRegistry(MUCRegistry* mucRegistry) { + mucRegistry_ = mucRegistry; +} + void AvatarManager::handlePresenceReceived(boost::shared_ptr<Presence> presence) { boost::shared_ptr<VCardUpdate> update = presence->getPayload<VCardUpdate>(); if (!update) { @@ -97,7 +101,7 @@ boost::filesystem::path AvatarManager::getAvatarPath(const JID& jid) const { JID AvatarManager::getAvatarJID(const JID& jid) const { JID bareFrom = jid.toBare(); - return (mucRegistry_->isMUC(bareFrom) ? jid : bareFrom); + return (mucRegistry_ && mucRegistry_->isMUC(bareFrom)) ? jid : bareFrom; } |