From c8a0b8a8606f42cd2cc6cd14c7f180319f45bf85 Mon Sep 17 00:00:00 2001 From: Eduardo Ramos Testillano Date: Wed, 7 Oct 2015 00:31:03 +0200 Subject: [PATCH] Allow set NULL codec engine --- source/diameter/codec/Message.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.20.1