summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/r300
diff options
context:
space:
mode:
authorMaciej Cencora <[email protected]>2010-03-09 23:13:19 +0100
committerMaciej Cencora <[email protected]>2010-03-09 23:13:19 +0100
commiteeaf1e0519912b2ca3a8bce56c35548f9e0b73ca (patch)
treea285d1cbafb06bc8691758b57877c0681105aeb4 /src/mesa/drivers/dri/r300
parentb70dcabafce0c1a8a9fbbd84ff196e46b0782ca7 (diff)
r300: don't crash if there's no colorbuffer
Diffstat (limited to 'src/mesa/drivers/dri/r300')
-rw-r--r--src/mesa/drivers/dri/r300/r300_state.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_state.c b/src/mesa/drivers/dri/r300/r300_state.c
index bdd12c6d220..87489412419 100644
--- a/src/mesa/drivers/dri/r300/r300_state.c
+++ b/src/mesa/drivers/dri/r300/r300_state.c
@@ -2245,8 +2245,13 @@ static void r300SetupUsOutputFormat(GLcontext *ctx)
{
r300ContextPtr rmesa = R300_CONTEXT(ctx);
uint32_t hw_format;
+ struct radeon_renderbuffer *rrb = radeon_get_colorbuffer(&rmesa->radeon);
- switch (radeon_get_colorbuffer(&rmesa->radeon)->base.Format)
+ if (!rrb) {
+ return;
+ }
+
+ switch (rrb->base.Format)
{
case MESA_FORMAT_RGBA5551:
case MESA_FORMAT_RGBA8888: