Only log debug messages if "debugImageLoading" is set

This commit is contained in:
Manuel Reimer 2014-11-10 16:38:09 +01:00
parent 529039e24c
commit 60cf545efa

View File

@ -50,7 +50,7 @@ cImage *cImageLoader::CreateImage(int width, int height, bool preserveAspect) {
importer->DrawToCairo(cr); importer->DrawToCairo(cr);
cairo_status_t status = cairo_status(cr); cairo_status_t status = cairo_status(cr);
if (status) if (status && config.debugImageLoading)
dsyslog("skindesigner: Cairo CreateImage Error %s", cairo_status_to_string(status)); dsyslog("skindesigner: Cairo CreateImage Error %s", cairo_status_to_string(status));
unsigned char *data = cairo_image_surface_get_data(surface); unsigned char *data = cairo_image_surface_get_data(surface);
@ -246,6 +246,7 @@ METHODDEF(void)
my_output_message(j_common_ptr cinfo) { my_output_message(j_common_ptr cinfo) {
char buf[JMSG_LENGTH_MAX]; char buf[JMSG_LENGTH_MAX];
cinfo->err->format_message(cinfo, buf); cinfo->err->format_message(cinfo, buf);
if (config.debugImageLoading)
dsyslog("skindesigner: libjpeg error: %s", buf); dsyslog("skindesigner: libjpeg error: %s", buf);
} }