summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@redhat.com>2008-04-08 18:26:24 -0400
committerKristian Høgsberg <krh@redhat.com>2008-04-08 18:31:07 -0400
commitc016f329abb3d638442bf0b0f27d8f34ebf54f86 (patch)
tree0d9d0e8d9d0327c70ba73bc369c9ea0b68eb3596 /src
parentda3e48186dc25f40925ca89b08baa5cd34143647 (diff)
Only convert configs if screen creation was successful.
Thanks to Adam Jackson for pointing it out.
Diffstat (limited to 'src')
-rw-r--r--src/glx/x11/dri_glx.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/glx/x11/dri_glx.c b/src/glx/x11/dri_glx.c
index 004af0bf3c..fd10047452 100644
--- a/src/glx/x11/dri_glx.c
+++ b/src/glx/x11/dri_glx.c
@@ -786,14 +786,16 @@ CallCreateNewScreen(Display *dpy, int scrn, __GLXscreenConfigs *psc,
& driver_configs,
psc);
- psc->configs =
- driConvertConfigs(psc->core,
- psc->configs,
- driver_configs);
- psc->visuals =
- driConvertConfigs(psc->core,
- psc->visuals,
- driver_configs);
+ if (psp) {
+ psc->configs =
+ driConvertConfigs(psc->core,
+ psc->configs,
+ driver_configs);
+ psc->visuals =
+ driConvertConfigs(psc->core,
+ psc->visuals,
+ driver_configs);
+ }
}
}
}