summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-04-20 16:12:16 -0600
committerBrian Paul <[email protected]>2009-04-20 16:12:16 -0600
commitc38397866d514d7776b0f876123be5718802482b (patch)
tree71ba189be010f2d5c647a811935b40e900a345a7
parentdce84002c25fee088a352410e75bff12ff548b3e (diff)
intel: added null screen->dri2.loader pointer check
Fixes front-buffer rendering with DRI1.
-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 ddcd264768b..ecaf6b45b72 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);