Skip to content

Commit

Permalink
Output informative log for <=0bpm in case crash occurs
Browse files Browse the repository at this point in the history
  • Loading branch information
poco0317 committed Oct 30, 2020
1 parent f50bf9b commit 0c3689c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Etterna/Models/Misc/TimingData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1421,6 +1421,8 @@ TimingData::BuildAndGetEtaner(const vector<int>& nerv)
event_row = bpms[i]->GetRow();
time_to_next_event = NoteRowToBeat(event_row - lastbpmrow) / bps;
const auto next_event_time = last_time + time_to_next_event;
if (bps <= 0)
Locator::getLogger()->warn("Found {} bps in file {} - Very likely to crash.", bps, m_sFile);
while (idx < nerv.size() && nerv[idx] <= event_row) {
const auto perc = (nerv[idx] - lastbpmrow) /
static_cast<float>(event_row - lastbpmrow);
Expand Down

0 comments on commit 0c3689c

Please sign in to comment.