diff options
author | Michel Dänzer <michel.daenzer@amd.com> | 2018-08-24 10:55:49 +0200 |
---|---|---|
committer | Michel Dänzer <michel@daenzer.net> | 2018-08-29 17:19:24 +0200 |
commit | 3c42bd04800211f64a17640c7ce7c4111ffd4978 (patch) | |
tree | 64cab09449cee8207a9967d030fd0cda1f12756c | |
parent | cba8fe4d64819aaa8ba516aa68dbe6d2aa153046 (diff) |
EXA: Handle NULL BO pointer in radeon_set_pixmap_bo
-rw-r--r-- | src/radeon.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/radeon.h b/src/radeon.h index 1a1edb1b..b1d5f5af 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; } |