From: Tomas Carnecky <t...@dbservice.com> As far as I can see this situation would arise when a window has a visual ID that is no longer in the screen visual list. I assumed the BadImplementation error code has been designed for these or similar situations.
Signed-off-by: Tomas Carnecky <t...@dbservice.com> --- I guess when this situation arises then it would also cause problems in other parts of the xserver. So if you think it doesn't make sense to add the check here, feel free to ignore this patch. I already wrote it when I realized that and since commits are cheap and send-email so easy to use, here you have it. glx/glxcmds.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/glx/glxcmds.c b/glx/glxcmds.c index eedab65..5404d19 100644 --- a/glx/glxcmds.c +++ b/glx/glxcmds.c @@ -120,6 +120,12 @@ validGlxFBConfigForWindow(ClientPtr client, __GLXconfig *config, } } + if (!pVisual) { + *err = BadImplementation; + client->errorValue = vid; + return FALSE; + } + /* FIXME: What exactly should we check here... */ if (pVisual->class != glxConvertToXVisualType(config->visualType) || !(config->drawableType & GLX_WINDOW_BIT)) { -- 1.6.5.4 _______________________________________________ xorg-devel mailing list xorg-devel@lists.x.org http://lists.x.org/mailman/listinfo/xorg-devel