Commits

mabe02  committed 459021a

Contribution from Steve:
* Check for null on incoming styles

  • Participants
  • Parent commits 527a4e4
  • Branches 1.0.x-branch

Comments (0)

Files changed (1)

File src/org/lantern/gui/TextGraphics.java

             string = string.substring(0, areaSize.getColumns() - column);
 
         EnumSet<Terminal.Style> stylesSet = EnumSet.noneOf(Terminal.Style.class);
-        stylesSet.addAll(Arrays.asList(styles));
+        if(styles != null && styles.length != 0)
+            stylesSet = EnumSet.copyOf(Arrays.asList(styles));
+        
         if(currentlyBold)
             stylesSet.add(Terminal.Style.Bold);