mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-23 22:00:13 +01:00
vbo: add a null pointer check to handle OOM instead of crashing
Note: This is a candidate for the 9.0 branch.
This commit is contained in:
parent
b13c534f14
commit
7a89f08a22
1 changed files with 5 additions and 0 deletions
|
|
@ -124,6 +124,11 @@ void vbo_exec_vtx_wrap( struct vbo_exec_context *exec )
|
|||
*/
|
||||
vbo_exec_wrap_buffers( exec );
|
||||
|
||||
if (!exec->vtx.buffer_ptr) {
|
||||
/* probably ran out of memory earlier when allocating the VBO */
|
||||
return;
|
||||
}
|
||||
|
||||
/* Copy stored stored vertices to start of new list.
|
||||
*/
|
||||
assert(exec->vtx.max_vert - exec->vtx.vert_count > exec->vtx.copied.nr);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue