In some cases _mesa_create_context() can return NULL an in the mesa state tracker, we do not concider the case, which may cause issues within st_create_context_priv() This patch adds a simple check (similar to the one in the dri drivers) Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Signed-off-by: Brian Paul <brianp@vmware.com>