intel: Check that we have a bufmgr or bail out when initializing the context.
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 21 Jan 2010 17:39:01 +0000 (17:39 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Mon, 22 Feb 2010 09:53:56 +0000 (09:53 +0000)
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
src/mesa/drivers/dri/intel/intel_context.c

index ced8d5aebe40fa77f3d9241221f3a5629d760a12..3c36c3f4c8f6eea7117864d84d1113c0ff04217d 100644 (file)
@@ -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__);