diff --git a/src/net/java/sip/communicator/impl/gui/main/chat/ChatWindow.java b/src/net/java/sip/communicator/impl/gui/main/chat/ChatWindow.java index bca869252..d53841da0 100644 --- a/src/net/java/sip/communicator/impl/gui/main/chat/ChatWindow.java +++ b/src/net/java/sip/communicator/impl/gui/main/chat/ChatWindow.java @@ -744,9 +744,23 @@ else if ((menuBar.getSelectedMenu() != null) } } else - { - GuiActivator - .getUIService().getChatWindowManager().closeAllChats(this, true); + { + if(ConfigurationUtils.isMultiChatWindowEnabled()) + { + GuiActivator + .getUIService().getChatWindowManager().closeAllChats(this, true); + } + else + { + ChatPanel chatPanel = getCurrentChat(); + + if(chatPanel == null + || chatPanel.getChatConversationPanel() == null) + return; + + GuiActivator + .getUIService().getChatWindowManager().closeChat(chatPanel); + } } }