intel: move error on create context to proper path
authorJordan Justen <jordan.l.justen@intel.com>
Tue, 17 Jul 2012 18:22:32 +0000 (11:22 -0700)
committerJordan Justen <jordan.l.justen@intel.com>
Tue, 24 Jul 2012 18:59:19 +0000 (11:59 -0700)
The error was being set on the non-error path, rather
than the error path.

NOTE: This is a candidate for the 8.0 branch.
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/mesa/drivers/dri/intel/intel_screen.c

index 81953ce..e8a4ad1 100644 (file)
@@ -696,10 +696,10 @@ intelCreateContext(gl_api api,
       if (ctx->VersionMajor > major_version
          || (ctx->VersionMajor == major_version
              && ctx->VersionMinor >= minor_version)) {
-        *error = __DRI_CTX_ERROR_BAD_VERSION;
         return true;
       }
 
+      *error = __DRI_CTX_ERROR_BAD_VERSION;
       intelDestroyContext(driContextPriv);
    } else {
       *error = __DRI_CTX_ERROR_NO_MEMORY;