Fix crash when using DebugDraw gem

Remove AtomBridgeSystemComponent requirement that the default window context exists before creating the default scene draw interface.

DebugDraw gem was crashing because the default scene DebugDisplayRequestBus implementation was not created.
This commit is contained in:
rgba16f
2021-05-26 10:25:30 -05:00
committed by GitHub
parent 78d6dc3613
commit c716d812bc
2 changed files with 11 additions and 47 deletions
@@ -274,12 +274,15 @@ namespace DebugDraw
AzFramework::DebugDisplayRequests* debugDisplay =
AzFramework::DebugDisplayRequestBus::FindFirstHandler(debugDisplayBus);
OnTickAabbs(*debugDisplay);
OnTickLines(*debugDisplay);
OnTickObbs(*debugDisplay);
OnTickRays(*debugDisplay);
OnTickSpheres(*debugDisplay);
OnTickText(*debugDisplay);
if (debugDisplay)
{
OnTickAabbs(*debugDisplay);
OnTickLines(*debugDisplay);
OnTickObbs(*debugDisplay);
OnTickRays(*debugDisplay);
OnTickSpheres(*debugDisplay);
OnTickText(*debugDisplay);
}
}
template <typename F>