diff options
author | Patrice Mandin <patmandin@gmail.com> | 2009-11-17 19:50:37 +0100 |
---|---|---|
committer | Patrice Mandin <patmandin@gmail.com> | 2009-11-17 19:50:37 +0100 |
commit | b353106467d386b48877d6ae1048cca3feaf99ff (patch) | |
tree | b70ed0cd3331225c8c31f8c586f30b09cb0bd4cb | |
parent | 49289f1d25d42a6b3eb5da5f85b2dd6a14cda8e7 (diff) |
nouveau: nv30: Check for NULL front (happens with DRI2)
-rw-r--r-- | src/gallium/drivers/nv30/nv30_screen.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gallium/drivers/nv30/nv30_screen.c b/src/gallium/drivers/nv30/nv30_screen.c index 221ae1b5f8..7cd36902eb 100644 --- a/src/gallium/drivers/nv30/nv30_screen.c +++ b/src/gallium/drivers/nv30/nv30_screen.c @@ -116,7 +116,10 @@ nv30_screen_surface_format_supported(struct pipe_screen *pscreen, case PIPE_FORMAT_Z24X8_UNORM: return TRUE; case PIPE_FORMAT_Z16_UNORM: - return (front->format == PIPE_FORMAT_R5G6B5_UNORM); + if (front) { + return (front->format == PIPE_FORMAT_R5G6B5_UNORM); + } + return TRUE; default: break; } |