protect against NULL handle
diff --git a/gralloc_drm.c b/gralloc_drm.c
index 0e0943b..d67561f 100644
--- a/gralloc_drm.c
+++ b/gralloc_drm.c
@@ -259,8 +259,11 @@
 {
 	struct gralloc_drm_handle_t *handle = gralloc_drm_handle(_handle);
 
+	if (!handle)
+		return NULL;
+
 	/* the buffer handle is passed to a new process */
-	if (handle && unlikely(handle->data_owner != gralloc_drm_pid)) {
+	if (unlikely(handle->data_owner != gralloc_drm_pid)) {
 		struct gralloc_drm_bo_t *bo;
 
 		if (!create)