diff options
Diffstat (limited to 'src/nouveau_dri2.c')
-rw-r--r-- | src/nouveau_dri2.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nouveau_dri2.c b/src/nouveau_dri2.c index 6876f9c..e3445b2 100644 --- a/src/nouveau_dri2.c +++ b/src/nouveau_dri2.c @@ -1097,8 +1097,8 @@ static int nouveau_dri3_fd_from_pixmap(ScreenPtr screen, PixmapPtr pixmap, CARD1 struct nouveau_bo *bo = nouveau_pixmap_bo(pixmap); int fd; - if (nouveau_bo_set_prime(bo, &fd) < 0) - return -1; + if (!bo || nouveau_bo_set_prime(bo, &fd) < 0) + return -EINVAL; *stride = pixmap->devKind; *size = bo->size; |