Skip to content

Commit

Permalink
[director] Fixed a crash when zooming too fast.
Browse files Browse the repository at this point in the history
  • Loading branch information
hozuki committed Oct 25, 2016
1 parent 70b3e3f commit 0ccde08
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ private void DrawBar(DrawingContext context) {
var visibleGridCountPerSignature = gridPerSignature / zoomMod;
var hasPartialGrids = visibleGridCountPerSignature * zoomMod != gridPerSignature;

if (visibleGridCountPerSignature <= 0) {
return;
}

for (var i = 0; i <= totalGridCount; ++i) {
if (i % zoomMod != 0 && i != totalGridCount) {
// Only draws key beats.
Expand Down

0 comments on commit 0ccde08

Please sign in to comment.