From 25741b1aa3a0fb39cb842a43ab52935673cfdefa Mon Sep 17 00:00:00 2001 From: Jon TURNEY Date: Sun, 2 Sep 2012 15:17:05 +0100 Subject: [PATCH] hw/xwin: Only add GLX extension once. Using of LoadExtension() to add GLX onto to the end of the list of extensions on every server regeneration leads to hilarious consequences (i.e. crashing) after the first regeneration :-) Possibly xf86ExtensionInit() and QuartzExtensionInit() need a similar fix. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison Tested-by: Colin Harrison --- hw/xwin/InitOutput.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/xwin/InitOutput.c b/hw/xwin/InitOutput.c index 37cd8b357..1cf0f02eb 100644 --- a/hw/xwin/InitOutput.c +++ b/hw/xwin/InitOutput.c @@ -164,7 +164,7 @@ void XwinExtensionInit(void) int i; #ifdef XWIN_GLX_WINDOWS - if ((g_fNativeGl) && (serverGeneration == 1)) { + if (g_fNativeGl) { /* install the native GL provider */ glxWinPushNativeProvider(); } @@ -901,7 +901,8 @@ InitOutput(ScreenInfo * screenInfo, int argc, char *argv[]) { int i; - XwinExtensionInit(); + if (serverGeneration == 1) + XwinExtensionInit(); /* Log the command line */ winLogCommandLine(argc, argv);