From: Michel Dänzer <michel.daenzer@xxxxxxx> Signed-off-by: Michel Dänzer <michel.daenzer at amd.com> --- src/radeon.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/radeon.h b/src/radeon.h index 1a1edb1ba..b1d5f5af4 100644 --- a/src/radeon.h +++ b/src/radeon.h @@ -772,11 +772,15 @@ static inline Bool radeon_set_pixmap_bo(PixmapPtr pPix, struct radeon_buffer *bo radeon_buffer_unref(&driver_priv->bo); drmmode_fb_reference(pRADEONEnt->fd, &driver_priv->fb, NULL); - radeon_buffer_ref(bo); driver_priv->bo = bo; - radeon_bo_get_tiling(bo->bo.radeon, &driver_priv->tiling_flags, - &pitch); + if (bo) { + radeon_buffer_ref(bo); + radeon_bo_get_tiling(bo->bo.radeon, &driver_priv->tiling_flags, + &pitch); + } else + driver_priv->tiling_flags = 0; + return TRUE; } -- 2.18.0