diff --git a/src/gui/filebrowser.cpp b/src/gui/filebrowser.cpp index fcc4c0682..fd127fd95 100644 --- a/src/gui/filebrowser.cpp +++ b/src/gui/filebrowser.cpp @@ -1473,7 +1473,7 @@ void CFileBrowser::paint() paintItem(count); //scrollbar - int total_pages = ((filelist.size() - 1) / listmaxshow) + 1; + int total_pages = filelist.size() == 0 ? 1 : ((filelist.size() - 1) / listmaxshow) + 1; int current_page = (selected / listmaxshow); paintScrollBar(x + width - SCROLLBAR_WIDTH, y + header_height, SCROLLBAR_WIDTH, item_height*listmaxshow, total_pages, current_page); diff --git a/src/gui/record_setup.cpp b/src/gui/record_setup.cpp index 4213ecf21..49ed97d86 100644 --- a/src/gui/record_setup.cpp +++ b/src/gui/record_setup.cpp @@ -350,7 +350,7 @@ void CRecordSetup::showRecordTimerSetup(CMenuWidget *menu_timersettings) menu_timersettings->addItem(GenericMenuSeparatorLine); //allow followscreenings - CMenuOptionChooser* followscreenings = new CMenuOptionChooser(LOCALE_TIMERSETTINGS_FOLLOWSCREENINGS, &g_settings.timer_followscreenings, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true); + CMenuOptionChooser* followscreenings = new CMenuOptionChooser(LOCALE_TIMERSETTINGS_FOLLOWSCREENINGS, &g_settings.timer_followscreenings, timer_followscreenings_options, timer_followscreenings_options_count, true); followscreenings->setHint("", LOCALE_MENU_HINT_TIMER_FOLLOWSCREENINGS); menu_timersettings->addItem(followscreenings); }