diff src/modules/graphics/opengl/ParticleSystem.cpp @ 1307:1c61424c6024

Cleaned up exception handling code when creating new fonts, spritebatches, and shaders
author Alex Szpakowski <slime73@gmail.com>
date Thu, 14 Feb 2013 21:49:11 -0400
parents b7f097053d74
children 4e3a9c782297 730ed5f01ab0
line wrap: on
line diff
--- a/src/modules/graphics/opengl/ParticleSystem.cpp	Thu Feb 14 08:03:55 2013 -0400
+++ b/src/modules/graphics/opengl/ParticleSystem.cpp	Thu Feb 14 21:49:11 2013 -0400
@@ -63,6 +63,7 @@
 	, pLast(0)
 	, pEnd(0)
 	, particleVerts(0)
+	, sprite(sprite)
 	, active(true)
 	, emissionRate(0)
 	, emitCounter(0)
@@ -91,11 +92,10 @@
 	, offsetX(sprite->getWidth()*0.5f)
 	, offsetY(sprite->getHeight()*0.5f)
 {
-	this->sprite = sprite;
-	sprite->retain();
 	sizes.push_back(1.0f);
 	colors.push_back(Colorf(1.0f, 1.0f, 1.0f, 1.0f));
 	setBufferSize(buffer);
+	sprite->retain();
 }
 
 ParticleSystem::~ParticleSystem()