Explorar o código

allow null for s2d/s3d

Nicolas Cannasse %!s(int64=5) %!d(string=hai) anos
pai
achega
725c13c62a
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      hxd/App.hx

+ 2 - 2
hxd/App.hx

@@ -187,8 +187,8 @@ class App implements h3d.IDrawable {
 		update(hxd.Timer.dt);
 		if( isDisposed ) return;
 		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);
 	}