diff options
author | Louis-Francis Ratté-Boulianne <[email protected]> | 2017-09-28 03:18:33 -0400 |
---|---|---|
committer | Daniel Stone <[email protected]> | 2018-02-15 11:58:17 +0000 |
commit | a34715ad9c84c4209de4c16fdf40655181350bd9 (patch) | |
tree | 7c3fba35424f8364fd77d290380a1dd87c2afc16 /src/gbm | |
parent | f0654dfa65e4004bcc9a4bea80f1e6a04a75ecff (diff) |
dri: fromPlanar() can return NULL as a valid result
It was assumed that fromPlanar() could return NULL to mean
that the planar image is the same as the parent DRI image.
That assumption wasn't made everywhere though.
Let's fix things and make sure that all callers understand
a NULL result
Signed-off-by: Louis-Francis Ratté-Boulianne <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
Reviewed-by: Daniel Stone <[email protected]>
Diffstat (limited to 'src/gbm')
-rw-r--r-- | src/gbm/backends/dri/gbm_dri.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gbm/backends/dri/gbm_dri.c b/src/gbm/backends/dri/gbm_dri.c index 0d088bd62b6..ed64ad61bf0 100644 --- a/src/gbm/backends/dri/gbm_dri.c +++ b/src/gbm/backends/dri/gbm_dri.c @@ -849,6 +849,7 @@ gbm_dri_bo_get_offset(struct gbm_bo *_bo, int plane) dri->image->queryImage(image, __DRI_IMAGE_ATTRIB_OFFSET, &offset); dri->image->destroyImage(image); } else { + assert(plane == 0); dri->image->queryImage(bo->image, __DRI_IMAGE_ATTRIB_OFFSET, &offset); } |