X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/ce2d38b90827215051cff18fa4b30c2d2c838a3d..d0ff64b9296711c98abcaf637f26ffb914ab5d06:/lib/service/servicedvb.cpp diff --git a/lib/service/servicedvb.cpp b/lib/service/servicedvb.cpp index 60aeb9fe..173f471b 100644 --- a/lib/service/servicedvb.cpp +++ b/lib/service/servicedvb.cpp @@ -1177,12 +1177,15 @@ RESULT eDVBServicePlay::stop() if (getLength(length)) length = 0; - - int perc = play_position * 100LL / length; - /* only store last play position when between 5% and 95% */ - if ((5 < perc) && (perc < 95)) - m_cue_entries.insert(cueEntry(play_position, 3)); /* last play position */ + if (length) + { + int perc = play_position * 100LL / length; + + /* only store last play position when between 5% and 95% */ + if ((5 < perc) && (perc < 95)) + m_cue_entries.insert(cueEntry(play_position, 3)); /* last play position */ + } m_cuesheet_changed = 1; } }