From fdd457c89fb5d210d29f878704969d85abd91e8f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Sat, 10 Sep 2016 09:50:42 +0200 Subject: [PATCH] ddebug: fix a crash in resource_get_handle MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 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(-) 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); } -- 2.30.2