copybit: Check for invalid handle
Change-Id: I3b0bcb3b464aaa15994add3b2f8d6feea3becc68
This commit is contained in:
parent
c30a98c79d
commit
b2f68b6190
@ -307,6 +307,11 @@ static int set_image(int device_fd, uint32 surfaceId, const struct copybit_image
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if(handle == NULL) {
|
||||
LOGE("%s: invalid handle", __func__);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (handle->gpuaddr == 0) {
|
||||
handle->gpuaddr = c2d_get_gpuaddr(device_fd, handle);
|
||||
if(!handle->gpuaddr) {
|
||||
|
Loading…
Reference in New Issue
Block a user