瀏覽代碼

Fixes issue 4009

I rewrote the code to disable and enable the buttons a while back, I'll add
this code as a fallback safety measure.

Change-Id: Ia6037f25f5222d6bf954d45f6344a0121a2dfca9
Reviewed-on: http://gerrit.dmdirc.com/1127
Automatic-Compile: DMDirc Local Commits <dmdirc@googlemail.com>
Reviewed-by: Chris Smith <chris@dmdirc.com>
tags/0.6.4
Greboid 14 年之前
父節點
當前提交
c4ee8a70ef
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3
    1
      src/com/dmdirc/addons/ui_swing/dialogs/profiles/ProfileDetailPanel.java

+ 3
- 1
src/com/dmdirc/addons/ui_swing/dialogs/profiles/ProfileDetailPanel.java 查看文件

@@ -335,7 +335,9 @@ public final class ProfileDetailPanel extends JPanel implements ActionListener,
335 335
                 /** {@inheritDoc} */
336 336
                 @Override
337 337
                 public boolean save() {
338
-                    nicknames.getModel().removeElementAt(nicknames.getSelectedIndex());
338
+                    if (nicknames.getSelectedIndex() != -1) {
339
+                        nicknames.getModel().removeElementAt(nicknames.getSelectedIndex());
340
+                    }
339 341
                     return true;
340 342
                 }
341 343
 

Loading…
取消
儲存