Skip to content

Commit

Permalink
Skip drawing lines with negative or zero width.
Browse files Browse the repository at this point in the history
Fixed GL error in Flying dragon.
  • Loading branch information
gonetz committed Aug 10, 2024
1 parent e7c1f93 commit 0056e08
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/GraphicsDrawer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1077,7 +1077,7 @@ void GraphicsDrawer::drawLine(u32 _v0, u32 _v1, float _width, u32 _flag)
m_texrectDrawer.draw();
m_statistics.lines++;

if (!_canDraw())
if (!_canDraw() || _width <= 0.0f)
return;

f32 lineWidth = _width;
Expand Down

0 comments on commit 0056e08

Please sign in to comment.