Skip to content
Snippets Groups Projects
Commit 188721d6 authored by Mike Blumenkrantz's avatar Mike Blumenkrantz :lifter: Committed by Marge Bot
Browse files

nine: check return on resource_get_handle


this has a return code, and if it return false, this is probably an
exit condition

cc: mesa-stable

Reviewed-by: default avatarDave Airlie <airlied@redhat.com>
Part-of: <mesa/mesa!17775>
parent b55b6399
No related branches found
No related tags found
No related merge requests found
......@@ -103,11 +103,14 @@ D3DWindowBuffer_create(struct NineSwapChain9 *This,
memset(&whandle, 0, sizeof(whandle));
whandle.type = WINSYS_HANDLE_TYPE_FD;
This->screen->resource_get_handle(This->screen, pipe, resource,
&whandle,
for_frontbuffer_reading ?
PIPE_HANDLE_USAGE_FRAMEBUFFER_WRITE :
PIPE_HANDLE_USAGE_EXPLICIT_FLUSH);
if (!This->screen->resource_get_handle(This->screen, pipe, resource,
&whandle,
for_frontbuffer_reading ?
PIPE_HANDLE_USAGE_FRAMEBUFFER_WRITE :
PIPE_HANDLE_USAGE_EXPLICIT_FLUSH)) {
ERR("Failed to get handle for resource\n");
return NULL;
}
nine_context_get_pipe_release(This->base.device);
stride = whandle.stride;
dmaBufFd = whandle.handle;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment