X-Git-Url: https://git.teslayout.com/public/public/public/?a=blobdiff_plain;f=source%2Fdiameter%2Fcodec%2FAvp.cpp;fp=source%2Fdiameter%2Fcodec%2FAvp.cpp;h=bb65e38b3972d95ac3a1758e3e1458784cafc403;hb=129500a50678c43ff28fb0054d6197899b8c0b2c;hp=26df7412d200037be9fb3b110b09b46f1ed69cc8;hpb=21d58fc1611bb292fdff8b31628ad88d552ce52b;p=anna.git diff --git a/source/diameter/codec/Avp.cpp b/source/diameter/codec/Avp.cpp index 26df741..bb65e38 100644 --- a/source/diameter/codec/Avp.cpp +++ b/source/diameter/codec/Avp.cpp @@ -81,7 +81,10 @@ Avp::~Avp() { //------------------------------------------------------------- Avp::getEngine() //------------------------------------------------------------------------------ Engine * Avp::getEngine() const throw(anna::RuntimeException) { - return a_engine ? a_engine : (a_engine = anna::functions::component (ANNA_FILE_LOCATION)); + if(!a_engine) + throw anna::RuntimeException("Invalid codec engine reference (NULL)", ANNA_FILE_LOCATION); + + return a_engine; } @@ -89,7 +92,6 @@ Engine * Avp::getEngine() const throw(anna::RuntimeException) { //------------------------------------------------------------ Avp::initialize() //------------------------------------------------------------------------------ void Avp::initialize() throw() { - a_engine = NULL; a_id = helpers::AVPID__AVP; // (0,0) a_flags = 0x00; a_insertionPositionForChilds = 0;