1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2025-02-04 13:08:31 +00:00

imlib2: don't flood warnings on non-existing images

This commit is contained in:
Phil Sutter 2009-09-10 01:59:08 +02:00
parent f33affdc03
commit 77cc646080

View File

@ -173,12 +173,16 @@ static void cimlib_draw_image(struct image_list_s *cur, int *clip_x, int
{
int w, h;
time_t now = time(NULL);
static int rep = 0;
image = imlib_load_image(cur->name);
if (!image) {
NORM_ERR("Unable to load image '%s'", cur->name);
if (!rep)
NORM_ERR("Unable to load image '%s'", cur->name);
rep = 1;
return;
}
rep = 0; /* reset so disappearing images are reported */
DBGP("Drawing image '%s' at (%i,%i) scaled to %ix%i, "
"caching interval set to %i (with -n opt %i)",