From b9d7097111bd68ac8e310cd097b361a4338f060c Mon Sep 17 00:00:00 2001 From: Alexander von Gluck IV Date: Wed, 19 Dec 2012 20:02:23 -0600 Subject: [PATCH] swpipe: Don't dereference pointer --- src/add-ons/opengl/swpipe/GalliumContext.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/add-ons/opengl/swpipe/GalliumContext.cpp b/src/add-ons/opengl/swpipe/GalliumContext.cpp index f06c7b96b7..de7d458333 100644 --- a/src/add-ons/opengl/swpipe/GalliumContext.cpp +++ b/src/add-ons/opengl/swpipe/GalliumContext.cpp @@ -52,6 +52,11 @@ hgl_viewport(struct gl_context* glContext, GLint x, GLint y, glContext, x, y, width, height); struct hgl_context *context = (struct hgl_context*)glContext->DriverCtx; + if (!context) { + ERROR("%s: No context yet. bailing.\n", __func__); + return; + } + int32 bitmapWidth; int32 bitmapHeight;