libhwcomposer: return error if Android native buffer is null

Change-Id: I78d35779aa0d15086828ad1cf10ce6ff8b844336
This commit is contained in:
Jeff Boody 2011-06-01 16:07:40 -06:00 committed by Govind Surti
parent 42c6d72977
commit 9d25efb361

View File

@ -318,6 +318,7 @@ static int drawLayerUsingCopybit(hwc_composer_device_t *dev, hwc_layer_t *layer,
android_native_buffer_t *renderBuffer = (android_native_buffer_t *)eglGetRenderBufferANDROID(dpy, surface);
if (!renderBuffer) {
LOGE("eglGetRenderBufferANDROID returned NULL buffer");
return -1;
}
private_handle_t *fbHandle = (private_handle_t *)renderBuffer->handle;
if(!fbHandle) {