Skip to content
Permalink
Browse files

[Physics] Enable PhysicsShapesRenderingService only if there is a IGr…

…aphicsDeviceService
  • Loading branch information
xen2 committed Jan 12, 2019
1 parent 8608ff0 commit eba446713da62822a110f9eda5ef3253818233dd
Showing with 2 additions and 1 deletion.
  1. +2 −1 sources/engine/Xenko.Physics/Engine/PhysicsProcessor.cs
@@ -167,8 +167,9 @@ protected override void OnSystemAdd()

((IReferencable)physicsSystem).AddReference();

var graphicsDeviceService = Services.GetServiceAs<Graphics.IGraphicsDeviceService>();
debugShapeRendering = Services.GetService<PhysicsShapesRenderingService>();
if (debugShapeRendering == null)
if (graphicsDeviceService != null && debugShapeRendering == null)
{
debugShapeRendering = new PhysicsShapesRenderingService(Services);
var gameSystems = Services.GetSafeServiceAs<IGameSystemCollection>();

0 comments on commit eba4467

Please sign in to comment.
You can’t perform that action at this time.