summaryrefslogtreecommitdiff
path: root/src/radeon_atombios.c
diff options
context:
space:
mode:
authorAlex Deucher <alexdeucher@gmail.com>2009-01-31 14:21:02 -0500
committerAlex Deucher <alexdeucher@gmail.com>2009-01-31 14:21:02 -0500
commit6fac3cefd1f46161c1e276ba40e72da2823aa9f6 (patch)
tree68eba4c5e64893a9b15025b70b4aba60f60832ff /src/radeon_atombios.c
parentdb178c852d00e9b85513d750b5f8f7495f9e3360 (diff)
Return NULL for encoder if no active device is assigned
fixes bug 19855
Diffstat (limited to 'src/radeon_atombios.c')
-rw-r--r--src/radeon_atombios.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/radeon_atombios.c b/src/radeon_atombios.c
index 9fe7ec72..61eb62b0 100644
--- a/src/radeon_atombios.c
+++ b/src/radeon_atombios.c
@@ -1593,8 +1593,10 @@ radeon_get_encoder(xf86OutputPtr output)
RADEONOutputPrivatePtr radeon_output = output->driver_private;
RADEONInfoPtr info = RADEONPTR(output->scrn);
- return info->encoders[radeon_get_device_index(radeon_output->active_device)];
-
+ if (radeon_output->active_device)
+ return info->encoders[radeon_get_device_index(radeon_output->active_device)];
+ else
+ return NULL;
}
Bool