aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/chatroomslist/ChatRoomTableDialog.java8
-rw-r--r--src/net/java/sip/communicator/impl/muc/MUCServiceImpl.java3
-rw-r--r--src/net/java/sip/communicator/service/muc/MUCService.java3
3 files changed, 12 insertions, 2 deletions
diff --git a/src/net/java/sip/communicator/impl/gui/main/chatroomslist/ChatRoomTableDialog.java b/src/net/java/sip/communicator/impl/gui/main/chatroomslist/ChatRoomTableDialog.java
index ac58e38..adec0cc 100644
--- a/src/net/java/sip/communicator/impl/gui/main/chatroomslist/ChatRoomTableDialog.java
+++ b/src/net/java/sip/communicator/impl/gui/main/chatroomslist/ChatRoomTableDialog.java
@@ -396,6 +396,14 @@ public class ChatRoomTableDialog
false,
false);
+ if (chatRoomWrapper == null)
+ {
+ // In case the protocol failed to create a chat room, null
+ // is returned, so we can stop preparing the UI to open the
+ // (null) chat room.
+ return;
+ }
+
if(!chatRoomWrapper.isPersistent())
{
chatRoomWrapper.setPersistent(true);
diff --git a/src/net/java/sip/communicator/impl/muc/MUCServiceImpl.java b/src/net/java/sip/communicator/impl/muc/MUCServiceImpl.java
index ca20e38..6169b87 100644
--- a/src/net/java/sip/communicator/impl/muc/MUCServiceImpl.java
+++ b/src/net/java/sip/communicator/impl/muc/MUCServiceImpl.java
@@ -412,7 +412,8 @@ public class MUCServiceImpl
* @param join whether we should join the room after creating it.
* @param persistent whether the newly created room will be persistent.
* @param isPrivate whether the room will be private or public.
- * @return the <tt>ChatRoomWrapper</tt> corresponding to the created room
+ * @return the <tt>ChatRoomWrapper</tt> corresponding to the created room or
+ * <tt>null</tt> if the protocol fails to create the chat room.
*/
public ChatRoomWrapper createChatRoom(
String roomName,
diff --git a/src/net/java/sip/communicator/service/muc/MUCService.java b/src/net/java/sip/communicator/service/muc/MUCService.java
index 1fb75bf..7a3337d 100644
--- a/src/net/java/sip/communicator/service/muc/MUCService.java
+++ b/src/net/java/sip/communicator/service/muc/MUCService.java
@@ -169,7 +169,8 @@ public abstract class MUCService
* @param join whether we should join the room after creating it.
* @param persistent whether the newly created room will be persistent.
* @param isPrivate whether the room will be private or public.
- * @return the <tt>ChatRoomWrapper</tt> corresponding to the created room
+ * @return the <tt>ChatRoomWrapper</tt> corresponding to the created room or
+ * <tt>null</tt> if the protocol failed to create the chat room
*/
public abstract ChatRoomWrapper createChatRoom(String roomName,
ProtocolProviderService protocolProvider, Collection<String> contacts,