summaryrefslogtreecommitdiffstats
path: root/lib/gui/png.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gui/png.c')
-rw-r--r--lib/gui/png.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/gui/png.c b/lib/gui/png.c
index 3845d7e4be..36b95f6afc 100644
--- a/lib/gui/png.c
+++ b/lib/gui/png.c
@@ -69,12 +69,8 @@ static int png_renderer(struct screen *sc, struct surface *s, struct image *img)
rgba_blend(&sc->info, img, buf, height, width, startx, starty, true);
- if (sc->offscreenbuf) {
- int fbsize;
-
- fbsize = sc->s.width * sc->s.height * (sc->info.bits_per_pixel >> 3);
- memcpy(sc->fb, sc->offscreenbuf, fbsize);
- }
+ if (sc->offscreenbuf)
+ memcpy(sc->fb, sc->offscreenbuf, sc->fbsize);
return img->height;
}