diff options
author | Michel Dänzer <michel.daenzer@amd.com> | 2018-08-24 10:56:58 +0200 |
---|---|---|
committer | Michel Dänzer <michel@daenzer.net> | 2018-08-29 17:23:26 +0200 |
commit | 1799680f7bd84e0618f34f4c7486799521ddaf83 (patch) | |
tree | 83a81f53599805d460b8d00764024a637add467c | |
parent | 3c42bd04800211f64a17640c7ce7c4111ffd4978 (diff) |
Handle ihandle == -1 in radeon_set_shared_pixmap_backing
It means to stop using the shared pixmap backing.
Fixes crash when changing PRIME slave output configuration.
-rw-r--r-- | src/radeon_bo_helper.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/radeon_bo_helper.c b/src/radeon_bo_helper.c index 79e8ff1b..da5a484f 100644 --- a/src/radeon_bo_helper.c +++ b/src/radeon_bo_helper.c @@ -454,6 +454,9 @@ Bool radeon_set_shared_pixmap_backing(PixmapPtr ppix, void *fd_handle, uint32_t size = ppix->devKind * ppix->drawable.height; Bool ret = FALSE; + if (ihandle == -1) + return radeon_set_pixmap_bo(ppix, NULL); + bo = (struct radeon_buffer *)calloc(1, sizeof(struct radeon_buffer)); if (!bo) goto error; |