summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2014-01-18 10:22:32 +0100
committerPetr Mrázek <peterix@gmail.com>2014-01-18 10:31:34 +0100
commit8650aa81f06d9e229764b200f1dca135412c2ec1 (patch)
treef717a96cf89f193985b577e70eddce6f0377aefb
parentecc80bd763111b0e368aa80366bd8382cd814ee6 (diff)
downloadMultiMC-8650aa81f06d9e229764b200f1dca135412c2ec1.tar
MultiMC-8650aa81f06d9e229764b200f1dca135412c2ec1.tar.gz
MultiMC-8650aa81f06d9e229764b200f1dca135412c2ec1.tar.lz
MultiMC-8650aa81f06d9e229764b200f1dca135412c2ec1.tar.xz
MultiMC-8650aa81f06d9e229764b200f1dca135412c2ec1.zip
Fix settings dialog when offline
-rw-r--r--gui/dialogs/SettingsDialog.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/gui/dialogs/SettingsDialog.cpp b/gui/dialogs/SettingsDialog.cpp
index b90434b0..ef363f02 100644
--- a/gui/dialogs/SettingsDialog.cpp
+++ b/gui/dialogs/SettingsDialog.cpp
@@ -269,6 +269,10 @@ void SettingsDialog::refreshUpdateChannelDesc()
// Get the channel list.
QList<UpdateChecker::ChannelListEntry> channelList = MMC->updateChecker()->getChannelList();
int selectedIndex = ui->updateChannelComboBox->currentIndex();
+ if(selectedIndex < 0)
+ {
+ return;
+ }
if (selectedIndex < channelList.count())
{
// Find the channel list entry with the given index.