The comment being deleted here is technically correct, it _should_ be impossible to generate anything other than BadAlloc here. But, due to a bug in the callee, that happens not to be the case. Let's not lose information without good reason.
Signed-off-by: Adam Jackson <[email protected]> --- glx/glxcmds.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/glx/glxcmds.c b/glx/glxcmds.c index c1f4e22..a32ceee 100644 --- a/glx/glxcmds.c +++ b/glx/glxcmds.c @@ -277,17 +277,15 @@ DoCreateContext(__GLXclientState * cl, GLXContextID gcId, ** Allocate memory for the new context */ if (!isDirect) { - /* Without any attributes, the only error that the driver should be - * able to generate is BadAlloc. As result, just drop the error - * returned from the driver on the floor. - */ glxc = pGlxScreen->createContext(pGlxScreen, config, shareglxc, 0, NULL, &err); + if (!glxc) + return err; } - else + else { glxc = __glXdirectContextCreate(pGlxScreen, config, shareglxc); - if (!glxc) { - return BadAlloc; + if (!glxc) + return BadAlloc; } /* Initialize the GLXcontext structure. -- 1.7.12.1 _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
