diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index cf0533285..e1bd25d51 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -157,13 +157,12 @@ void CChannelList::updateEvents(unsigned int from, unsigned int to) if ((*chanlist).empty()) return; - if (from > (*chanlist).size() || from >= to) - return; - - if (to == 0 || to > (*chanlist).size()) to = (*chanlist).size(); + if (from > (*chanlist).size() || from >= to) + return; + size_t chanlist_size = to - from; CChannelEventList events;