aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorYana Stamcheva <yana@jitsi.org>2010-05-11 11:32:17 +0000
committerYana Stamcheva <yana@jitsi.org>2010-05-11 11:32:17 +0000
commitbc16ffd341ff1edf981948a20eda359fe711ca29 (patch)
tree8623fd0a6d428379ec8e83667d86500cdd980b0b /src
parent3503e4127dad413b4c8a3b09539ab305c03139de (diff)
downloadjitsi-bc16ffd341ff1edf981948a20eda359fe711ca29.zip
jitsi-bc16ffd341ff1edf981948a20eda359fe711ca29.tar.gz
jitsi-bc16ffd341ff1edf981948a20eda359fe711ca29.tar.bz2
Addressing issue #818 (NPE when sending File if no chat window is open). NullPointerException is now fixed.
Diffstat (limited to 'src')
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/contactlist/MetaContactRightButtonMenu.java11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/net/java/sip/communicator/impl/gui/main/contactlist/MetaContactRightButtonMenu.java b/src/net/java/sip/communicator/impl/gui/main/contactlist/MetaContactRightButtonMenu.java
index b055980..6fbf26d 100644
--- a/src/net/java/sip/communicator/impl/gui/main/contactlist/MetaContactRightButtonMenu.java
+++ b/src/net/java/sip/communicator/impl/gui/main/contactlist/MetaContactRightButtonMenu.java
@@ -18,6 +18,7 @@ import net.java.sip.communicator.impl.gui.customcontrols.*;
import net.java.sip.communicator.impl.gui.event.*;
import net.java.sip.communicator.impl.gui.main.*;
import net.java.sip.communicator.impl.gui.main.call.*;
+import net.java.sip.communicator.impl.gui.main.chat.*;
import net.java.sip.communicator.impl.gui.main.chat.history.*;
import net.java.sip.communicator.impl.gui.main.contactlist.contactsource.*;
import net.java.sip.communicator.impl.gui.utils.*;
@@ -475,9 +476,15 @@ public class MetaContactRightButtonMenu
ConfigurationManager.setSendFileLastDir(
selectedFile.getParent());
+ // Obtain the corresponding chat panel.
+ ChatPanel chatPanel
+ = GuiActivator.getUIService().
+ getChatWindowManager().getContactChat(contactItem, true);
+
+ chatPanel.sendFile(selectedFile);
+
GuiActivator.getUIService().
- getChatWindowManager().getSelectedChat().
- sendFile(selectedFile);
+ getChatWindowManager().openChat(chatPanel, true);
}
GuiActivator.getUIService().getChatWindowManager()