summaryrefslogtreecommitdiff
path: root/src/JPEGOutputImage.cxx
diff options
context:
space:
mode:
authorJohannes Hofmann <Johannes.Hofmann@gmx.de>2006-08-03 20:45:57 +0200
committerJohannes Hofmann <Johannes.Hofmann@gmx.de>2006-08-03 20:45:57 +0200
commit6524c95bb8ea0339908ab9bff03211f8c42e77d9 (patch)
tree5edf64b415049d9a1f84a4e840adc6110e70c886 /src/JPEGOutputImage.cxx
parent4894107e215fd13e8121bcdc3b610c4db7556689 (diff)
add TIFFOutputImage
Diffstat (limited to 'src/JPEGOutputImage.cxx')
-rw-r--r--src/JPEGOutputImage.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/JPEGOutputImage.cxx b/src/JPEGOutputImage.cxx
index 9e00458..3f7fd11 100644
--- a/src/JPEGOutputImage.cxx
+++ b/src/JPEGOutputImage.cxx
@@ -101,11 +101,13 @@ JPEGOutputImage::next_line_internal() {
int
JPEGOutputImage::done_internal() {
- next_line_internal();
jpeg_finish_compress(&cinfo);
- fclose(fp);
- fp = NULL;
jpeg_destroy_compress(&cinfo);
+
+ if (fp) {
+ fclose(fp);
+ fp = NULL;
+ }
if (row) {
free(row);
}