-rw-r--r-- | noncore/net/mail/selectsmtp.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/noncore/net/mail/selectsmtp.cpp b/noncore/net/mail/selectsmtp.cpp index e82c6ca..79b10ef 100644 --- a/noncore/net/mail/selectsmtp.cpp +++ b/noncore/net/mail/selectsmtp.cpp @@ -44,11 +44,17 @@ void selectsmtp::slotAccountselected(int which) void selectsmtp::setSelectionlist(QList<SMTPaccount>*list) { m_smtpList = list; accountSelection->clear(); + if (!m_smtpList || m_smtpList->count()==0) { + accountSelection->setEnabled(false); + return; + } + accountSelection->setEnabled(true); for (unsigned i = 0; m_smtpList!=0 && i < m_smtpList->count(); ++i) { accountSelection->insertItem( m_smtpList->at(i)->getAccountName()); } + m_current_smtp = m_smtpList->at(0); } SMTPaccount*selectsmtp::selected_smtp() { |