mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-31 02:09:22 +00:00
Fix iterator bug in send() method of ChatMessagePrivate.
This commit is contained in:
parent
4c89ac95e2
commit
2d97f5ded9
1 changed files with 5 additions and 5 deletions
|
|
@ -663,16 +663,16 @@ void ChatMessagePrivate::send () {
|
|||
}
|
||||
|
||||
// Restore FileContents and remove FileTransferContents
|
||||
list<Content*>::iterator i = contents.begin();
|
||||
while (i != contents.end()) {
|
||||
Content *content = *i;
|
||||
list<Content*>::iterator it = contents.begin();
|
||||
while (it != contents.end()) {
|
||||
Content *content = *it;
|
||||
if (content->getContentType() == ContentType::FileTransfer) {
|
||||
FileTransferContent *fileTransferContent = (FileTransferContent *)content;
|
||||
contents.erase(i++);
|
||||
it = contents.erase(it);
|
||||
q->addContent(*fileTransferContent->getFileContent());
|
||||
delete fileTransferContent;
|
||||
} else {
|
||||
++i;
|
||||
it++;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue