diff options
author | Mathias Agopian <mathias@google.com> | 2009-11-19 19:07:17 -0800 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2009-11-19 19:07:17 -0800 |
commit | 935b3deec9cce3b67ba21994e67db89c196a402e (patch) | |
tree | c55fe873feae715fcf745d7be20d920859a537df /opengl/libagl | |
parent | af86e2aa3f521e0d27fcb8674186f2e6ae956abd (diff) | |
parent | 1a1ce3a6a25b2d2062dff654e1355d48363b9c57 (diff) | |
download | frameworks_native-935b3deec9cce3b67ba21994e67db89c196a402e.zip frameworks_native-935b3deec9cce3b67ba21994e67db89c196a402e.tar.gz frameworks_native-935b3deec9cce3b67ba21994e67db89c196a402e.tar.bz2 |
am 13feccf5: Merge change I39f0003e into eclair
Merge commit '13feccf592d6870b41b3b8a0a31d2abefad0d7ae' into eclair-plus-aosp
* commit '13feccf592d6870b41b3b8a0a31d2abefad0d7ae':
fix [2235414] libagl glDeleteBuffers() crashes
Diffstat (limited to 'opengl/libagl')
-rw-r--r-- | opengl/libagl/array.cpp | 36 |
1 files changed, 24 insertions, 12 deletions
diff --git a/opengl/libagl/array.cpp b/opengl/libagl/array.cpp index 4878722..71825c5 100644 --- a/opengl/libagl/array.cpp +++ b/opengl/libagl/array.cpp @@ -1548,24 +1548,36 @@ void glDeleteBuffers(GLsizei n, const GLuint* buffers) GLuint name = buffers[i]; if (name) { // unbind bound deleted buffers... - if (c->arrays.element_array_buffer->name == name) { - c->arrays.element_array_buffer = 0; + if (c->arrays.element_array_buffer) { + if (c->arrays.element_array_buffer->name == name) { + c->arrays.element_array_buffer = 0; + } } - if (c->arrays.array_buffer->name == name) { - c->arrays.array_buffer = 0; + if (c->arrays.array_buffer) { + if (c->arrays.array_buffer->name == name) { + c->arrays.array_buffer = 0; + } } - if (c->arrays.vertex.bo->name == name) { - c->arrays.vertex.bo = 0; + if (c->arrays.vertex.bo) { + if (c->arrays.vertex.bo->name == name) { + c->arrays.vertex.bo = 0; + } } - if (c->arrays.normal.bo->name == name) { - c->arrays.normal.bo = 0; + if (c->arrays.normal.bo) { + if (c->arrays.normal.bo->name == name) { + c->arrays.normal.bo = 0; + } } - if (c->arrays.color.bo->name == name) { - c->arrays.color.bo = 0; + if (c->arrays.color.bo) { + if (c->arrays.color.bo->name == name) { + c->arrays.color.bo = 0; + } } for (int t=0 ; t<GGL_TEXTURE_UNIT_COUNT ; t++) { - if (c->arrays.texture[t].bo->name == name) { - c->arrays.texture[t].bo = 0; + if (c->arrays.texture[t].bo) { + if (c->arrays.texture[t].bo->name == name) { + c->arrays.texture[t].bo = 0; + } } } } |