>From ce37ca3de7aa80f176295ad8d5ace111ec28888a Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Alex=20Villac=C3=ADs=20Lasso?= <alex@karlalex.palosanto.com>
Date: Sat, 14 Mar 2009 21:34:48 -0500
Subject: [PATCH] Fix crash by null pointer access when DRI is not available.

---
 src/savage_video.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/savage_video.c b/src/savage_video.c
index 57483e0..bccb801 100644
--- a/src/savage_video.c
+++ b/src/savage_video.c
@@ -1965,7 +1965,7 @@ SavagePutImage(
 
     /* Check whether AGP buffers can be allocated. If not, fall back to ordinary
        upload to framebuffer (slower) */
-    if (!pPriv->tried_agp && !psav->IsPCI && psav->drmFD > 0) {
+    if (!pPriv->tried_agp && !psav->IsPCI && psav->drmFD > 0 && psav->DRIServerInfo != NULL) {
         int ret;
 	SAVAGEDRIServerPrivatePtr pSAVAGEDRIServer = psav->DRIServerInfo;
         
-- 
1.6.0.6

