diff --git a/x.c b/x.c index cfa4411..7e9f972 100644 --- a/x.c +++ b/x.c @@ -3145,8 +3145,8 @@ xfinishdraw(void) continue; /* scale the image */ - width = im->width * win.cw / im->cw; - height = im->height * win.ch / im->ch; + width = MAX(im->width * win.cw / im->cw, 1); + height = MAX(im->height * win.ch / im->ch, 1); if (!im->pixmap) { im->pixmap = (void *)XCreatePixmap(xw.dpy, xw.win, width, height, #if ALPHA_PATCH