Skip to content

Commit

Permalink
[Fix] Fix a std::out_of_range exception when the sum of seek steps is…
Browse files Browse the repository at this point in the history
… zero.
  • Loading branch information
ace20022 committed May 27, 2015
1 parent ac429af commit cb92761
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions xbmc/utils/SeekHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ void CSeekHandler::Reset()

int CSeekHandler::GetSeekStepSize(SeekType type, int step)
{
if (step == 0)
return 0;

std::vector<int> seekSteps(step > 0 ? m_forwardSeekSteps.at(type) : m_backwardSeekSteps.at(type));

if (seekSteps.empty())
Expand Down

0 comments on commit cb92761

Please sign in to comment.