segfault fix by Jarrod Johnson <jbj-zl@ura.dnsalias.org>

approved by Vladimir Mosgalin, the original author of that code snippet


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12467 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
diego 2004-05-13 08:52:34 +00:00
parent 010e3cc77f
commit 2fc8111523
1 changed files with 5 additions and 1 deletions

View File

@ -930,7 +930,11 @@ vidix_capability_t def_cap =
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;