summaryrefslogtreecommitdiffstats
path: root/opengl
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2009-11-19 19:12:01 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2009-11-19 19:12:01 -0800
commit8e9af2bd1d600cd2c69c88c7d60c7d455921677e (patch)
treeeb3d0bb4399d1af1db5b864a99e0ab8277c0cfe3 /opengl
parent23eb822369952931935589a8b838929b4c044fba (diff)
parentb439f561a6aa3900f1850e71a4aa60618af13f90 (diff)
downloadframeworks_base-8e9af2bd1d600cd2c69c88c7d60c7d455921677e.zip
frameworks_base-8e9af2bd1d600cd2c69c88c7d60c7d455921677e.tar.gz
frameworks_base-8e9af2bd1d600cd2c69c88c7d60c7d455921677e.tar.bz2
am b439f561: am 13feccf5: Merge change I39f0003e into eclair
Merge commit 'b439f561a6aa3900f1850e71a4aa60618af13f90' into eclair-mr2-plus-aosp * commit 'b439f561a6aa3900f1850e71a4aa60618af13f90': fix [2235414] libagl glDeleteBuffers() crashes
Diffstat (limited to 'opengl')
-rw-r--r--opengl/libagl/array.cpp36
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;
+ }
}
}
}