diff --git a/src/driver/fb_accel_td.cpp b/src/driver/fb_accel_td.cpp index 7ecc562c2..9b45f1570 100644 --- a/src/driver/fb_accel_td.cpp +++ b/src/driver/fb_accel_td.cpp @@ -109,6 +109,7 @@ void CFbAccelTD::blit2FB(void *fbbuff, uint32_t width, uint32_t height, uint32_t DFBResult err; IDirectFBSurface *surf; DFBSurfaceDescription dsc; + int pitch = width * sizeof(fb_pixel_t); src.x = xp; src.y = yp; @@ -120,12 +121,13 @@ void CFbAccelTD::blit2FB(void *fbbuff, uint32_t width, uint32_t height, uint32_t dsc.width = width; dsc.height = height; dsc.preallocated[0].data = fbbuff; - dsc.preallocated[0].pitch = width * sizeof(fb_pixel_t); + dsc.preallocated[0].pitch = pitch; err = dfb->CreateSurface(dfb, &dsc, &surf); - /* TODO: maybe we should not die if this fails? */ if (err != DFB_OK) { - fprintf(stderr, LOGTAG "blit2FB: "); - DirectFBErrorFatal("dfb->CreateSurface(dfb, &dsc, &surf)", err); + /* probably width or height out of range... */ + fprintf(stderr, LOGTAG "blit2FB: w:%d h:%d data:0x%p pitch:%d\n", width, height, fbbuff, pitch); + DirectFBError("dfb->CreateSurface(dfb, &dsc, &surf)", err); + return; } if (transp)