projects
/
profile
/
ivi
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6b745a4
)
vbo: add a null pointer check to handle OOM instead of crashing
author
Brian Paul
<brianp@vmware.com>
Thu, 24 Jan 2013 23:32:42 +0000
(16:32 -0700)
committer
Andreas Boll
<andreas.boll.dev@gmail.com>
Wed, 13 Feb 2013 17:46:39 +0000
(18:46 +0100)
Note: This is a candidate for the 9.0 branch.
(cherry picked from commit
7a89f08a22eb83ed2f0c51e516397d6415e64a3d
)
src/mesa/vbo/vbo_exec_api.c
patch
|
blob
|
history
diff --git
a/src/mesa/vbo/vbo_exec_api.c
b/src/mesa/vbo/vbo_exec_api.c
index
64762c7
..
a02f0b2
100644
(file)
--- a/
src/mesa/vbo/vbo_exec_api.c
+++ b/
src/mesa/vbo/vbo_exec_api.c
@@
-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);