Changeset 379:71736e5f6307 in SMSSender


Ignore:
Timestamp:
Apr 14, 2014 5:22:00 PM (5 years ago)
Author:
Sämy Zehnder <saemy.zehnder@…>
Branch:
separation-frontend-backend
Message:
  • Fixes crash when sending SMS over Schoolnet but no open question is available anymore.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • gateways/Schoolnet/gui/ui/senddialogintegration.cpp

    r316 r379  
    8282
    8383        layout->addWidget(m_questionBox.data(), layout->rowCount()+1, 0, layout->columnCount()-1, layout->columnCount());
     84    } else {
     85        m_sendDialog->allowClose();
    8486    }
    8587}
     
    109111
    110112    // Load the next question
    111     m_question = m_deepThoughtHelper->questionManager().openQuestions(m_account).first();
     113    QList<DeepThought::Question *> openQuestions =
     114            m_deepThoughtHelper->questionManager().openQuestions(m_account);
     115    m_question = !openQuestions.empty() ? openQuestions.first() : NULL;
    112116    if (m_question && m_questionBox) {
    113117        m_questionBox->loadQuestion(*m_question);
Note: See TracChangeset for help on using the changeset viewer.