summaryrefslogtreecommitdiff
path: root/src/radeon_exa.c
diff options
context:
space:
mode:
authorMichel Dänzer <michel.daenzer@amd.com>2018-08-24 10:58:51 +0200
committerMichel Dänzer <michel@daenzer.net>2018-08-29 17:23:30 +0200
commit84bde2df5b453f8aab35aa18b0cf1f20b8d20488 (patch)
treeee35750ba6033f80cb423bb5d26cd409e7967194 /src/radeon_exa.c
parent1799680f7bd84e0618f34f4c7486799521ddaf83 (diff)
EXA: Handle ihandle == -1 in RADEONEXASharePixmapBacking
Diffstat (limited to 'src/radeon_exa.c')
-rw-r--r--src/radeon_exa.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/radeon_exa.c b/src/radeon_exa.c
index 93c2f056..268155ed 100644
--- a/src/radeon_exa.c
+++ b/src/radeon_exa.c
@@ -296,11 +296,12 @@ Bool RADEONEXASharePixmapBacking(PixmapPtr ppix, ScreenPtr slave, void **fd_hand
Bool RADEONEXASetSharedPixmapBacking(PixmapPtr ppix, void *fd_handle)
{
struct radeon_exa_pixmap_priv *driver_priv = exaGetPixmapDriverPrivate(ppix);
+ int ihandle = (int)(long)fd_handle;
if (!radeon_set_shared_pixmap_backing(ppix, fd_handle, &driver_priv->surface))
return FALSE;
- driver_priv->shared = TRUE;
+ driver_priv->shared = ihandle != -1;
return TRUE;
}