Only convert configs if screen creation was successful.
authorKristian Høgsberg <krh@redhat.com>
Tue, 8 Apr 2008 22:26:24 +0000 (18:26 -0400)
committerKristian Høgsberg <krh@redhat.com>
Tue, 8 Apr 2008 22:31:07 +0000 (18:31 -0400)
Thanks to Adam Jackson for pointing it out.

progs/demos/Makefile
src/glx/x11/dri_glx.c

index 456bd4a2c70f53036c0c3e7a37c6b6c952ed3760..01b76ad10508d18bcd2754aa79a1a31a388ea986 100644 (file)
@@ -13,7 +13,7 @@ OSMESA32_LIBS = -L$(TOP)/$(LIB_DIR) -lglut -lOSMesa32 -lGLU -lGL $(APP_LIB_DEPS)
 
 LIB_DEP = $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME) $(TOP)/$(LIB_DIR)/$(GLU_LIB_NAME) $(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME)
 
-LIBS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) $(APP_LIB_DEPS)
+LIBS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) $(APP_LIB_DEPS) -lX11  -lXi -lXmu
 
 PROGS = \
        arbfplight \
index 004af0bf3c1daf8eda495f897ff5881e28c0a542..fd100474523adab90280455b854e8ce717bfeb53 100644 (file)
@@ -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);
+                                   }
                                }
                            }
                        }