Fix settings dialog when offline

This commit is contained in:
Petr Mrázek 2014-01-18 10:22:32 +01:00
parent ecc80bd763
commit 8650aa81f0

View File

@ -269,6 +269,10 @@ void SettingsDialog::refreshUpdateChannelDesc()
// Get the channel list. // Get the channel list.
QList<UpdateChecker::ChannelListEntry> channelList = MMC->updateChecker()->getChannelList(); QList<UpdateChecker::ChannelListEntry> channelList = MMC->updateChecker()->getChannelList();
int selectedIndex = ui->updateChannelComboBox->currentIndex(); int selectedIndex = ui->updateChannelComboBox->currentIndex();
if(selectedIndex < 0)
{
return;
}
if (selectedIndex < channelList.count()) if (selectedIndex < channelList.count())
{ {
// Find the channel list entry with the given index. // Find the channel list entry with the given index.