Browse Source

allow null for s2d/s3d

Nicolas Cannasse 5 years ago
parent
commit
725c13c62a
1 changed files with 2 additions and 2 deletions
  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);
 	}