mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-18 11:38:08 +00:00
Log an error and abort sending chat message without any content
This commit is contained in:
parent
69f1982653
commit
404e213cc4
1 changed files with 8 additions and 2 deletions
|
|
@ -593,8 +593,14 @@ void ChatMessagePrivate::send () {
|
|||
// End of message modification
|
||||
// ---------------------------------------
|
||||
|
||||
if (internalContent.isEmpty())
|
||||
internalContent = *(contents.front());
|
||||
if (internalContent.isEmpty()) {
|
||||
if (contents.size() > 0) {
|
||||
internalContent = *(contents.front());
|
||||
} else {
|
||||
lError() << "Trying to send a message without any content !";
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
auto msgOp = dynamic_cast<SalMessageOpInterface *>(op);
|
||||
if (internalContent.getContentType().isValid()) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue