diff --git a/toolkit/xre/glxtest.cpp b/toolkit/xre/glxtest.cpp index 09d5126e2784..907cf43a47ab 100644 --- a/toolkit/xre/glxtest.cpp +++ b/toolkit/xre/glxtest.cpp @@ -209,7 +209,7 @@ static void glxtest() const GLubyte *vendorString = glGetString(GL_VENDOR); const GLubyte *rendererString = glGetString(GL_RENDERER); const GLubyte *versionString = glGetString(GL_VERSION); - + if (!vendorString || !rendererString || !versionString) fatal_error("glGetString returned null"); @@ -229,7 +229,16 @@ static void glxtest() glXDestroyContext(dpy, context); XDestroyWindow(dpy, window); XFreeColormap(dpy, swa.colormap); + +#ifdef NS_FREE_PERMANENT_DATA // conditionally defined in nscore.h, don't forget to #include it above XCloseDisplay(dpy); +#else + // This XSync call wanted to be instead: + // XCloseDisplay(dpy); + // but this can cause 1-minute stalls on certain setups using Nouveau, see bug 973192 + XSync(dpy, False); +#endif + dlclose(libgl); ///// Finally write data to the pipe