Make sure that we specify the -l flag before trying to write to a log file.

This commit is contained in:
Pavel Krajcevski 2013-09-30 11:08:33 -04:00
parent 63a235958d
commit f3c37defcc

View file

@ -230,7 +230,11 @@ int main(int argc, char **argv) {
settings.iQuality = quality;
settings.iNumCompressions = numCompressions;
settings.iJobSize = numJobs;
settings.logStream = &logStream;
if(bSaveLog) {
settings.logStream = &logStream;
} else {
settings.logStream = NULL;
}
CompressedImage *ci = CompressImage(&img, settings);
if(NULL == ci) {