summaryrefslogtreecommitdiff
authorBrian Paul <brianp@vmware.com>2009-04-20 22:12:16 (GMT)
committer Brian Paul <brianp@vmware.com>2009-04-20 22:12:16 (GMT)
commitc38397866d514d7776b0f876123be5718802482b (patch) (side-by-side diff)
tree71ba189be010f2d5c647a811935b40e900a345a7
parentdce84002c25fee088a352410e75bff12ff548b3e (diff)
downloadmesa-c38397866d514d7776b0f876123be5718802482b.zip
mesa-c38397866d514d7776b0f876123be5718802482b.tar.gz
intel: added null screen->dri2.loader pointer check
Fixes front-buffer rendering with DRI1.
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--src/mesa/drivers/dri/intel/intel_context.c3
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);