From 5abee283d310a70efa4c713707f06624d5462322 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Thu, 21 Jan 2010 17:39:01 +0000 Subject: intel: Check that we have a bufmgr or bail out when initializing the context. Signed-off-by: Chris Wilson --- src/mesa/drivers/dri/intel/intel_context.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/mesa/drivers/dri') diff --git a/src/mesa/drivers/dri/intel/intel_context.c b/src/mesa/drivers/dri/intel/intel_context.c index ced8d5aebe..3c36c3f4c8 100644 --- a/src/mesa/drivers/dri/intel/intel_context.c +++ b/src/mesa/drivers/dri/intel/intel_context.c @@ -594,6 +594,10 @@ intelInitContext(struct intel_context *intel, struct intel_screen *intelScreen = sPriv->private; int bo_reuse_mode; + /* we can't do anything without a connection to the device */ + if (intelScreen->bufmgr == NULL) + return GL_FALSE; + if (!_mesa_initialize_context(&intel->ctx, mesaVis, shareCtx, functions, (void *) intel)) { printf("%s: failed to init mesa context\n", __FUNCTION__); -- cgit v1.2.3