Skip to content

Commit 2cf2cc7

Browse files
author
SeanLin
committed
Merge pull request cocos2d#934 from dingpinglv/Iss2144_RewriteParticleBatchNode
fixed cocos2d#2144 fixed a bug of cc.ParticleSystemQuad
2 parents aad0591 + ecfd84d commit 2cf2cc7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

cocos2d/particle_nodes/CCParticleSystemQuad.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -675,8 +675,10 @@ cc.ParticleSystemQuad = cc.ParticleSystem.extend(/** @lends cc.ParticleSystemQua
675675
this._setupVBO();
676676

677677
//set the texture coord
678-
var size = this._texture.getContentSize();
679-
this.initTexCoordsWithRect(cc.rect(0, 0, size.width, size.height));
678+
if(this._texture){
679+
var size = this._texture.getContentSize();
680+
this.initTexCoordsWithRect(cc.rect(0, 0, size.width, size.height));
681+
}
680682
} else
681683
this._totalParticles = tp;
682684
this.resetSystem();

0 commit comments

Comments
 (0)