mirror of
https://github.com/X11Libre/xf86-video-ati.git
synced 2026-03-24 01:24:43 +00:00
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.
This commit is contained in:
committed by
Michel Dänzer
parent
3c42bd0480
commit
1799680f7b
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user