Make sure to not set an output stream if the user hasn't requested it.

This commit is contained in:
Pavel Krajcevski 2013-09-29 14:32:21 -04:00
parent 89fbaf8170
commit a2390189f8

View File

@ -232,7 +232,10 @@ int _tmain(int argc, _TCHAR* argv[])
settings.iQuality = quality;
settings.iNumCompressions = numCompressions;
settings.iJobSize = numJobs;
if(bSaveLog)
settings.logStream = &logStream;
else
settings.logStream = NULL;
CompressedImage *ci = CompressImage(&img, settings);
if(NULL == ci) {