mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-06 00:10:20 +01:00
st/mesa: check if _mesa_create_context() returns NULL
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>
This commit is contained in:
parent
4ef9c3d21b
commit
1ab5e15242
1 changed files with 3 additions and 0 deletions
|
|
@ -179,6 +179,9 @@ struct st_context *st_create_context(gl_api api, struct pipe_context *pipe,
|
|||
st_init_driver_functions(&funcs);
|
||||
|
||||
ctx = _mesa_create_context(api, visual, shareCtx, &funcs, NULL);
|
||||
if (!ctx) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* XXX: need a capability bit in gallium to query if the pipe
|
||||
* driver prefers DP4 or MUL/MAD for vertex transformation.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue