summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri
diff options
context:
space:
mode:
authorPauli Nieminen <suokkos@gmail.com>2009-09-01 00:39:20 +0300
committerPauli Nieminen <suokkos@gmail.com>2009-09-01 00:39:20 +0300
commitc4a3e036ed1c755a291018251c4f55c45ac17079 (patch)
tree9437f78c83ca4c1796ce4119bdd2e40bcbfa4451 /src/mesa/drivers/dri
parentd028cf9313aa0d2c43566acec4bbf4f6167f060e (diff)
radeon: Fix null pointer reference in debug system if no context is bind.
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_debug.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/radeon/radeon_debug.c b/src/mesa/drivers/dri/radeon/radeon_debug.c
index 691680e956..a1ed39683f 100644
--- a/src/mesa/drivers/dri/radeon/radeon_debug.c
+++ b/src/mesa/drivers/dri/radeon/radeon_debug.c
@@ -91,8 +91,11 @@ extern void _radeon_print(const radeon_debug_type_t type,
va_list values)
{
GET_CURRENT_CONTEXT(ctx);
- radeonContextPtr radeon = RADEON_CONTEXT(ctx);
- // FIXME: Make this multi thread safe
- fprintf(stderr, "%s", radeon->debug.indent);
+ if (ctx) {
+ radeonContextPtr radeon = RADEON_CONTEXT(ctx);
+ // FIXME: Make this multi thread safe
+ if (radeon->debug.indent_depth)
+ fprintf(stderr, "%s", radeon->debug.indent);
+ }
vfprintf(stderr, message, values);
}