ソースを参照

Remove references to old physics callbacks, fixes #139

Bart van Strien 15 年 前
コミット
c0789b1da3
1 ファイル変更4 行追加0 行削除
  1. 4 0
      src/modules/physics/box2d/World.cpp

+ 4 - 0
src/modules/physics/box2d/World.cpp

@@ -153,12 +153,16 @@ namespace box2d
 		switch(n)
 		{
 		case 4:
+			if (result.ref) delete result.ref;
 			result.ref = luax_refif(L, LUA_TFUNCTION);
 		case 3:
+			if (remove.ref) delete remove.ref;
 			remove.ref = luax_refif(L, LUA_TFUNCTION);
 		case 2:
+			if (persist.ref) delete persist.ref;
 			persist.ref = luax_refif(L, LUA_TFUNCTION);
 		case 1:
+			if (add.ref) delete add.ref;
 			add.ref = luax_refif(L, LUA_TFUNCTION);
 		}