Fix assertion when trying to draw a line with one point. This would trigger an ensure if one enabled the unitmotion overlay.

Patch by: @vladislavbelov
This was SVN commit r27016.
This commit is contained in:
Stan
2022-07-25 20:08:03 +00:00
parent fbc9e19544
commit 9d2275e26b
+3
View File
@@ -78,6 +78,9 @@ void CDebugRenderer::DrawLine(
const std::vector<CVector3D>& line, const CColor& color,
const float width, const bool depthTestEnabled)
{
if (line.size() <= 1)
return;
CShaderTechniquePtr debugLineTech =
g_Renderer.GetShaderManager().LoadEffect(str_debug_line);
Renderer::Backend::IDeviceCommandContext* deviceCommandContext =