[Mesa-dev] [PATCH 1/2] ddebug: fix a crash in resource_get_handle
Marek Olšák
maraeo at gmail.com
Mon Sep 12 21:18:39 UTC 2016
From: Marek Olšák <marek.olsak at amd.com>
broken recently
---
src/gallium/drivers/ddebug/dd_screen.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/gallium/drivers/ddebug/dd_screen.c b/src/gallium/drivers/ddebug/dd_screen.c
index 4050e39..a0c0dd0 100644
--- a/src/gallium/drivers/ddebug/dd_screen.c
+++ b/src/gallium/drivers/ddebug/dd_screen.c
@@ -236,21 +236,21 @@ dd_screen_resource_destroy(struct pipe_screen *_screen,
}
static boolean
dd_screen_resource_get_handle(struct pipe_screen *_screen,
struct pipe_context *_pipe,
struct pipe_resource *resource,
struct winsys_handle *handle,
unsigned usage)
{
struct pipe_screen *screen = dd_screen(_screen)->screen;
- struct pipe_context *pipe = dd_context(_pipe)->pipe;
+ struct pipe_context *pipe = _pipe ? dd_context(_pipe)->pipe : NULL;
return screen->resource_get_handle(screen, pipe, resource, handle, usage);
}
/********************************************************************
* fence
*/
static void
--
2.7.4
More information about the mesa-dev
mailing list