summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-04-10 08:35:21 -0600
committerBrian Paul <[email protected]>2009-04-10 08:36:19 -0600
commitded05d32d5f948770ece088ea0ed6363c0055a4c (patch)
treebf03becc2bc774f6a1b4193affe38d48c44e1270 /src
parent88999de8b70d1e170f5bbcadd07132d382c560cf (diff)
intel: added screen->dri2.loader null pointer check in intel_flush()
Fixes segfaults when rendering to front buffer.
Diffstat (limited to 'src')
-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 56d03c1e784..3436b8ecd30 100644
--- a/src/mesa/drivers/dri/intel/intel_context.c
+++ b/src/mesa/drivers/dri/intel/intel_context.c
@@ -400,7 +400,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);