From: Marek Olšák Date: Sat, 10 Sep 2016 07:50:42 +0000 (+0200) Subject: ddebug: fix a crash in resource_get_handle X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fdd457c89fb5d210d29f878704969d85abd91e8f;p=mesa.git ddebug: fix a crash in resource_get_handle broken recently Reviewed-by: Nicolai Hähnle --- 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); }