diff --git a/exa/exa.c b/exa/exa.c index 4b96af8..0676838 100644 --- a/exa/exa.c +++ b/exa/exa.c @@ -204,7 +204,7 @@ exaCreatePixmap(ScreenPtr pScreen, int w pExaPixmap->fb_ptr = NULL; if (pExaScr->info->flags & EXA_OFFSCREEN_ALIGN_POT && w != 1) - pExaPixmap->fb_pitch = (1 << (exaLog2(w - 1) + 1)) * bpp / 8; + pExaPixmap->fb_pitch = (w != 0) ? (1 << (exaLog2(w - 1) + 1)) * bpp / 8 : 0; else pExaPixmap->fb_pitch = w * bpp / 8; pExaPixmap->fb_pitch = EXA_ALIGN(pExaPixmap->fb_pitch,