diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-11-22 22:49:21 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-11-22 22:49:21 +0100 |
commit | 9fa148794db7a91d56631cfadffda380a9d4c103 (patch) | |
tree | 81a9bb16591190a102ece6e1e6db56129165a38f | |
parent | 3194e4d495526589edd8e13c3205dba4471da5ea (diff) | |
download | kube-9fa148794db7a91d56631cfadffda380a9d4c103.tar.gz kube-9fa148794db7a91d56631cfadffda380a9d4c103.zip |
Avoid crashing if we fail to assemble the message
-rw-r--r-- | framework/src/domain/composercontroller.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/framework/src/domain/composercontroller.cpp b/framework/src/domain/composercontroller.cpp index d2b65d06..fb3857a5 100644 --- a/framework/src/domain/composercontroller.cpp +++ b/framework/src/domain/composercontroller.cpp | |||
@@ -494,6 +494,10 @@ void ComposerController::send() | |||
494 | // verify<To, Subject>() | 494 | // verify<To, Subject>() |
495 | // && verify<Subject>(); | 495 | // && verify<Subject>(); |
496 | auto message = assembleMessage(); | 496 | auto message = assembleMessage(); |
497 | if (!message) { | ||
498 | SinkWarning() << "Failed to assemble the message."; | ||
499 | return; | ||
500 | } | ||
497 | 501 | ||
498 | auto accountId = getAccountId(); | 502 | auto accountId = getAccountId(); |
499 | //SinkLog() << "Sending a mail: " << *this; | 503 | //SinkLog() << "Sending a mail: " << *this; |