Skip to content

Commit 0746c85

Browse files
author
Patrick Collins
committed
Fixed crash bug related to CCLabelBMFonts
- cocos2d#3
1 parent 6337729 commit 0746c85

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

cocos2d/CCDrawNode.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,8 @@ -(void)dealloc
162162

163163
glDeleteBuffers(1, &_vbo); _vbo = 0;
164164
glDeleteVertexArrays(1, &_vao); _vao = 0;
165-
165+
ccGLBindVAO(0);
166+
166167
[super dealloc];
167168
}
168169

cocos2d/CCParticleSystemQuad.m

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ - (void) setTotalParticles:(NSUInteger)tp
162162
// clean VAO
163163
glDeleteBuffers(2, &_buffersVBO[0]);
164164
glDeleteVertexArrays(1, &_VAOname);
165+
ccGLBindVAO(0);
165166

166167
[self initVAO];
167168
}
@@ -227,6 +228,7 @@ -(void) dealloc
227228

228229
glDeleteBuffers(2, &_buffersVBO[0]);
229230
glDeleteVertexArrays(1, &_VAOname);
231+
ccGLBindVAO(0);
230232
}
231233

232234
[super dealloc];
@@ -489,6 +491,7 @@ -(void) setBatchNode:(CCParticleBatchNode *)batchNode
489491

490492
glDeleteBuffers(2, &_buffersVBO[0]);
491493
glDeleteVertexArrays(1, &_VAOname);
494+
ccGLBindVAO(0);
492495
}
493496
}
494497
}

cocos2d/CCTextureAtlas.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ -(void) dealloc
140140

141141
#if CC_TEXTURE_ATLAS_USE_VAO
142142
glDeleteVertexArrays(1, &_VAOname);
143+
ccGLBindVAO(0);
143144
#endif
144145

145146
[_texture release];

0 commit comments

Comments
 (0)