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

Fixed NPE when no room name was specified when registering with a room. JM-1028

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@7983 b35dd754-fafc-0310-a699-88a17e54d16e
parent 0d5edcf9
...@@ -106,7 +106,11 @@ class IQMUCRegisterHandler { ...@@ -106,7 +106,11 @@ class IQMUCRegisterHandler {
public IQ handleIQ(IQ packet) { public IQ handleIQ(IQ packet) {
IQ reply = null; IQ reply = null;
// Get the target room // Get the target room
MUCRoom room = mucServer.getChatRoom(packet.getTo().getNode()); MUCRoom room = null;
String name = packet.getTo().getNode();
if (name != null) {
room = mucServer.getChatRoom(name);
}
if (room == null) { if (room == null) {
// The room doesn't exist so answer a NOT_FOUND error // The room doesn't exist so answer a NOT_FOUND error
reply = IQ.createResultIQ(packet); reply = IQ.createResultIQ(packet);
......
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