diff options
-rw-r--r-- | gralloc_drm.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gralloc_drm.c b/gralloc_drm.c index 710a56f..af33986 100644 --- a/gralloc_drm.c +++ b/gralloc_drm.c @@ -246,7 +246,10 @@ struct gralloc_drm_bo_t *gralloc_drm_bo_validate(struct gralloc_drm_t *drm, struct gralloc_drm_bo_t *bo; /* create the struct gralloc_drm_bo_t locally */ - bo = drm->drv->alloc(drm->drv, handle); + if (handle->name) + bo = drm->drv->alloc(drm->drv, handle); + else /* an invalid handle */ + bo = NULL; if (bo) { bo->drm = drm; bo->imported = 1; |