ソースを参照

allow null for s2d/s3d

Nicolas Cannasse 5 年 前
コミット
725c13c62a
1 ファイル変更2 行追加2 行削除
  1. 2 2
      hxd/App.hx

+ 2 - 2
hxd/App.hx

@@ -187,8 +187,8 @@ class App implements h3d.IDrawable {
 		update(hxd.Timer.dt);
 		update(hxd.Timer.dt);
 		if( isDisposed ) return;
 		if( isDisposed ) return;
 		var dt = hxd.Timer.dt; // fetch again in case it's been modified in update()
 		var dt = hxd.Timer.dt; // fetch again in case it's been modified in update()
-		s2d.setElapsedTime(dt);
-		s3d.setElapsedTime(dt);
+		if( s2d != null ) s2d.setElapsedTime(dt);
+		if( s3d != null ) s3d.setElapsedTime(dt);
 		engine.render(this);
 		engine.render(this);
 	}
 	}