Mesa (master): intel: move error on create context to proper path

Jordan Justen jljusten at kemper.freedesktop.org
Tue Jul 24 19:03:14 UTC 2012


Module: Mesa
Branch: master
Commit: 881bb4ac7285c462079844072fc1d0b26e340b12
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=881bb4ac7285c462079844072fc1d0b26e340b12

Author: Jordan Justen <jordan.l.justen at intel.com>
Date:   Tue Jul 17 11:22:32 2012 -0700

intel: move error on create context to proper path

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 at intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>

---

 src/mesa/drivers/dri/intel/intel_screen.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mesa/drivers/dri/intel/intel_screen.c b/src/mesa/drivers/dri/intel/intel_screen.c
index 81953ce..e8a4ad1 100644
--- a/src/mesa/drivers/dri/intel/intel_screen.c
+++ b/src/mesa/drivers/dri/intel/intel_screen.c
@@ -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;




More information about the mesa-commit mailing list