Mesa (gallium-mesa-7.4): intel: added null screen->dri2. loader pointer check

Alan Hourihane alanh at kemper.freedesktop.org
Fri Apr 24 16:23:41 UTC 2009


Module: Mesa
Branch: gallium-mesa-7.4
Commit: c38397866d514d7776b0f876123be5718802482b
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=c38397866d514d7776b0f876123be5718802482b

Author: Brian Paul <brianp at vmware.com>
Date:   Mon Apr 20 16:12:16 2009 -0600

intel: added null screen->dri2.loader pointer check

Fixes front-buffer rendering with DRI1.

---

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

diff --git a/src/mesa/drivers/dri/intel/intel_context.c b/src/mesa/drivers/dri/intel/intel_context.c
index ddcd264..ecaf6b4 100644
--- a/src/mesa/drivers/dri/intel/intel_context.c
+++ b/src/mesa/drivers/dri/intel/intel_context.c
@@ -534,7 +534,8 @@ intel_flush(GLcontext *ctx, GLboolean needs_mi_flush)
    if ((ctx->DrawBuffer->Name == 0) && intel->front_buffer_dirty) {
       __DRIscreen *const screen = intel->intelScreen->driScrnPriv;
 
-      if ((screen->dri2.loader->base.version >= 2)
+      if (screen->dri2.loader
+          && (screen->dri2.loader->base.version >= 2)
 	  && (screen->dri2.loader->flushFrontBuffer != NULL)) {
 	 (*screen->dri2.loader->flushFrontBuffer)(intel->driDrawable,
 						  intel->driDrawable->loaderPrivate);




More information about the mesa-commit mailing list