diff --git a/git/pushdialog.cpp b/git/pushdialog.cpp --- a/git/pushdialog.cpp +++ b/git/pushdialog.cpp @@ -119,7 +119,9 @@ m_localBranchComboBox->addItem(branch); } } - m_localBranchComboBox->setCurrentText(branches.at(currentBranchIndex)); + if (currentBranchIndex >= 0) { + m_localBranchComboBox->setCurrentText(branches.at(currentBranchIndex)); + } remoteSelectionChanged(m_remoteComboBox->currentText()); //Signals