mirror of
https://github.com/igniterealtime/Spark.git
synced 2025-12-01 12:27:58 +00:00
Solved getting ArrayOutOfBoundException when searching contacts with Ctrl-F
git-svn-id: http://svn.igniterealtime.org/svn/repos/spark/trunk@12208 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
committed by
holger.bergunde
parent
472a0b650a
commit
e9430d589c
@ -62,9 +62,12 @@ public class JContactItemField extends JPanel {
|
||||
list = new JList(model) {
|
||||
public String getToolTipText(MouseEvent e) {
|
||||
int row = locationToIndex(e.getPoint());
|
||||
final ContactItem item = (ContactItem)getModel().getElementAt(row);
|
||||
if (item != null) {
|
||||
return item.getJID();
|
||||
if (row >= 0)
|
||||
{
|
||||
final ContactItem item = (ContactItem)getModel().getElementAt(row);
|
||||
if (item != null) {
|
||||
return item.getJID();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user