Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
liblinphone
Commits
c91dc4b5
Commit
c91dc4b5
authored
Dec 05, 2017
by
Benjamin REIS
Browse files
fix crash in file transfer
parent
c865794c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
src/chat/chat-message/chat-message.cpp
src/chat/chat-message/chat-message.cpp
+7
-3
No files found.
src/chat/chat-message/chat-message.cpp
View file @
c91dc4b5
...
...
@@ -538,13 +538,17 @@ void ChatMessagePrivate::send () {
}
else
msgOp
->
send_message
(
ContentType
::
PlainText
.
asString
().
c_str
(),
internalContent
.
getBodyAsString
().
c_str
());
for
(
Content
*
content
:
contents
)
{
// Restore FileContents and remove FileTransferContents
// Restore FileContents and remove FileTransferContents
list
<
Content
*>::
iterator
i
=
contents
.
begin
();
while
(
i
!=
contents
.
end
())
{
Content
*
content
=
*
i
;
if
(
content
->
getContentType
()
==
ContentType
::
FileTransfer
)
{
FileTransferContent
*
fileTransferContent
=
(
FileTransferContent
*
)
content
;
q
->
removeContent
(
*
content
);
contents
.
erase
(
i
++
);
q
->
addContent
(
*
fileTransferContent
->
getFileContent
());
delete
fileTransferContent
;
}
else
{
++
i
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment