From fdd457c89fb5d210d29f878704969d85abd91e8f Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Sat, 10 Sep 2016 09:50:42 +0200 Subject: ddebug: fix a crash in resource_get_handle MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit broken recently Reviewed-by: Nicolai Hähnle --- src/gallium/drivers/ddebug/dd_screen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gallium/drivers') diff --git a/src/gallium/drivers/ddebug/dd_screen.c b/src/gallium/drivers/ddebug/dd_screen.c index 4050e39a124..a0c0dd09092 100644 --- a/src/gallium/drivers/ddebug/dd_screen.c +++ b/src/gallium/drivers/ddebug/dd_screen.c @@ -243,7 +243,7 @@ dd_screen_resource_get_handle(struct pipe_screen *_screen, 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); } -- cgit v1.2.3