Skip to content

Commit

Permalink
My changes to use a ByteArrayOutputStream would cause a NullPointerEx…
Browse files Browse the repository at this point in the history
…ception if you didn't specify an output file.

This fixes that, yikes.
  • Loading branch information
tivac committed Apr 19, 2011
1 parent 4c60b2d commit fc5d01e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/net/nczonline/web/cssembed/CSSEmbed.java
Expand Up @@ -183,7 +183,10 @@ public static void main(String[] args) {
if (out != null) {
try {
out.close();
bytes.writeTo(new FileOutputStream(outputFilename));

if(bytes.size() > 0) {
bytes.writeTo(new FileOutputStream(outputFilename));
}
} catch (IOException e) {
System.err.println("[ERROR] " + e.getMessage());
if (verbose){
Expand Down

0 comments on commit fc5d01e

Please sign in to comment.