Skip to content
This repository has been archived by the owner on Nov 16, 2018. It is now read-only.

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 24, 2011
1 parent a4f622d commit 2b4fae3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/net/nczonline/web/cssembed/CSSEmbed.java
Expand Up @@ -203,7 +203,9 @@ public static void main(String[] args) {
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 2b4fae3

Please sign in to comment.