changeset 12466:b5e7d2464c00

segfault fix by Jarrod Johnson <jbj-zl@ura.dnsalias.org> approved by Vladimir Mosgalin, the original author of that code snippet
author diego
date Thu, 13 May 2004 08:52:34 +0000
parents dea4857df1c6
children 5b1458ea64c9
files vidix/drivers/radeon_vid.c
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/vidix/drivers/radeon_vid.c	Wed May 12 22:56:55 2004 +0000
+++ b/vidix/drivers/radeon_vid.c	Thu May 13 08:52:34 2004 +0000
@@ -930,7 +930,11 @@
 void probe_fireGL_driver() {
   Display *dp = XOpenDisplay ((void*)0);
   int n = 0;
-  char **extlist = XListExtensions (dp, &n);
+  char **extlist;
+  if (dp==NULL) {
+       return;
+  }
+  extlist = XListExtensions (dp, &n);
   XCloseDisplay (dp);
   if (extlist) {
     int i;