Changeset 268:d9cd0d793af4 in qutecom-coip


Ignore:
Timestamp:
Jun 23, 2010 4:34:21 PM (3 years ago)
Author:
laurent
Branch:
default
Message:

bug fix : crash on call when no sip account are set

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gui/src/callbar/callbar.cpp

    r177 r268  
    2323{ 
    2424        AccountList accountList = AccountListHelper::getCopyOfAccountsOfProtocol(Coip::self()->getTUserProfileManager().getCopyOfUserProfile().getAccountList(),EnumAccountType::AccountTypeSIP); 
    25         IMContact imContact(EnumAccountType::AccountTypeSIP,ui->lineEdit->text().toStdString()); 
    26         Account account = accountList.front(); 
    27         imContact.setAccountId(account.getUUID()); 
    28          
    29         Contact contact; 
    30         contact.addIMContact(imContact); 
    31                                                                                                                                                           
    32         Calls::self()->createNewCallSessionWithContact(contact); 
    33         ui->lineEdit->setText(""); 
     25        if(!accountList.empty()) 
     26        { 
     27                IMContact imContact(EnumAccountType::AccountTypeSIP,ui->lineEdit->text().toStdString()); 
     28                Account account = accountList.front(); 
     29                imContact.setAccountId(account.getUUID()); 
     30                 
     31                Contact contact; 
     32                contact.addIMContact(imContact); 
     33                 
     34                Calls::self()->createNewCallSessionWithContact(contact); 
     35                ui->lineEdit->setText(""); 
     36        }        
    3437} 
    3538 
Note: See TracChangeset for help on using the changeset viewer.