Browse Source

Don't set foreground of null objects.

I should probably fix this is a nicer way, but this works.

Change-Id: I87ba4cb91d4fc99e3e2a00dde4ca909070150c9f
Reviewed-on: http://gerrit.dmdirc.com/3758
Reviewed-by: Chris Smith <chris@dmdirc.com>
Automatic-Compile: DMDirc Build Manager
changes/58/3758/2
Greg Holmes 9 years ago
parent
commit
a21a51bb61

+ 6
- 2
src/com/dmdirc/addons/ui_swing/components/addonpanel/AddonCell.java View File

@@ -126,8 +126,12 @@ public class AddonCell extends JPanel implements AddonToggleListener {
126 126
 
127 127
     @Override
128 128
     public void setForeground(final Color fg) {
129
-        name.setForeground(fg);
130
-        status.setForeground(fg);
129
+        if (name != null) {
130
+            name.setForeground(fg);
131
+        }
132
+        if (status != null) {
133
+            status.setForeground(fg);
134
+        }
131 135
     }
132 136
 
133 137
     @Override

Loading…
Cancel
Save