Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions gralloc_gbm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,11 @@ buffer_handle_t gralloc_gbm_bo_create(struct gbm_device *gbm,
struct gbm_bo *bo;
native_handle_t *handle;

if (gralloc_gbm_get_bpp(format) == 0) {
ALOGE("Failed to create gbm bo due to unsupported HAL pixel format: 0x%x", format);
return NULL;
}

handle = gralloc_handle_create(width, height, format, usage);
if (!handle)
return NULL;
Expand Down