Commit dc5af4fa authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

Fixes NPE when session no longer exists. JM-610

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@3637 b35dd754-fafc-0310-a699-88a17e54d16e
parent 0f0b2cb4
......@@ -147,7 +147,7 @@ public class IQPrivacyHandler extends IQHandler
}
// Add the active list (only if there is an active list for the session)
ClientSession session = sessionManager.getSession(from);
if (session.getActiveList() != null) {
if (session != null && session.getActiveList() != null) {
childElement.addElement("active")
.addAttribute("name", session.getActiveList().getName());
}
......@@ -215,9 +215,11 @@ public class IQPrivacyHandler extends IQHandler
if (list != null) {
// Get the user session
ClientSession session = sessionManager.getSession(from);
if (session != null) {
// Set the new active list for this session
session.setActiveList(list);
}
}
else {
// List not found
result.setError(PacketError.Condition.item_not_found);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment