Skip to content
Snippets Groups Projects
Commit 0be3c72c authored by dg's avatar dg
Browse files

Fix a rare particles crash

git-svn-id: http://svn.net-core.org/repos/t-engine4@3259 51575b47-30f0-44d4-a5cc-537603b46e54
parent f66337e7
No related branches found
No related tags found
No related merge requests found
......@@ -367,7 +367,7 @@ static int particles_emit(lua_State *L)
{
plist *l = (plist*)lua_touserdata(L, lua_upvalueindex(1)); // The first upvalue, store in the closure, is the particle's plist
particles_type *ps = l->ps;
if (!ps->init) return 0;
if (!ps || !ps->init) return 0;
int nb = luaL_checknumber(L, 2);
if (!nb) return 0;
// printf("Emitting %d particles out of %d for system %x\n", nb, ps->nb, (int)ps);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment