Module: Mesa Branch: master Commit: 27e77cb902b4f7f5e127dcd78951e3167f13d59c URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=27e77cb902b4f7f5e127dcd78951e3167f13d59c
Author: Marcin Slusarz <marcin.slus...@gmail.com> Date: Fri Nov 11 20:45:08 2011 +0100 nv50/nvc0: fix crash when channel allocation fails --- src/gallium/drivers/nv50/nv50_screen.c | 3 ++- src/gallium/drivers/nvc0/nvc0_screen.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/nv50/nv50_screen.c b/src/gallium/drivers/nv50/nv50_screen.c index 47eba85..3cd5fdf 100644 --- a/src/gallium/drivers/nv50/nv50_screen.c +++ b/src/gallium/drivers/nv50/nv50_screen.c @@ -228,7 +228,8 @@ nv50_screen_destroy(struct pipe_screen *pscreen) nouveau_fence_wait(screen->base.fence.current); nouveau_fence_ref (NULL, &screen->base.fence.current); } - screen->base.channel->user_private = NULL; + if (screen->base.channel) + screen->base.channel->user_private = NULL; if (screen->blitctx) FREE(screen->blitctx); diff --git a/src/gallium/drivers/nvc0/nvc0_screen.c b/src/gallium/drivers/nvc0/nvc0_screen.c index 38f918a..79c3e36 100644 --- a/src/gallium/drivers/nvc0/nvc0_screen.c +++ b/src/gallium/drivers/nvc0/nvc0_screen.c @@ -220,7 +220,8 @@ nvc0_screen_destroy(struct pipe_screen *pscreen) nouveau_fence_wait(screen->base.fence.current); nouveau_fence_ref(NULL, &screen->base.fence.current); } - screen->base.channel->user_private = NULL; + if (screen->base.channel) + screen->base.channel->user_private = NULL; if (screen->blitctx) FREE(screen->blitctx); _______________________________________________ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit