#46 BoxLayoutManager working
[fanfix.git] / src / jexer / TComboBox.java
index fe1366d3aad49693802efa0a3af0fee114abd3fc..2d1b2c07539f1755c88429b4764391a1ee3bde21 100644 (file)
@@ -222,8 +222,12 @@ public class TComboBox extends TWidget {
      */
     @Override
     public void setWidth(final int width) {
-        field.setWidth(width - 3);
-        list.setWidth(width);
+        if (field != null) {
+            field.setWidth(width - 3);
+        }
+        if (list != null) {
+            list.setWidth(width);
+        }
         super.setWidth(width);
     }