From: Eduardo Ramos Testillano Date: Tue, 6 Oct 2015 22:31:03 +0000 (+0200) Subject: Allow set NULL codec engine X-Git-Tag: REFACTORING_TESTING_LIBRARY~97 X-Git-Url: https://git.teslayout.com/public/public/public/?a=commitdiff_plain;h=c8a0b8a8606f42cd2cc6cd14c7f180319f45bf85;p=anna.git Allow set NULL codec engine --- diff --git a/source/diameter/codec/Message.cpp b/source/diameter/codec/Message.cpp index 6593dd4..5849196 100644 --- a/source/diameter/codec/Message.cpp +++ b/source/diameter/codec/Message.cpp @@ -84,7 +84,7 @@ Message::~Message() { //------------------------------------------------------------------------------ void Message::setEngine(Engine *engine) throw() { - if (a_engine && engine != a_engine) { + if (a_engine && engine && (engine != a_engine)) { LOGWARNING(anna::Logger::warning("Ignored: it is not a good practice to change the codec engine once assigned. Clear the message first to set the engine again.", ANNA_FILE_LOCATION)); return; }