diff -r 3553901f7fa8 -r 1f776524b15c telephonyprotocols/pdplayer/umts/spudtel/src/ceteldriverfactory.cpp --- a/telephonyprotocols/pdplayer/umts/spudtel/src/ceteldriverfactory.cpp Tue Feb 02 01:41:59 2010 +0200 +++ b/telephonyprotocols/pdplayer/umts/spudtel/src/ceteldriverfactory.cpp Fri Mar 19 09:55:57 2010 +0200 @@ -205,12 +205,14 @@ { SPUDTELVERBOSE_INFO_LOG1(_L("Free pdp id : %d"), aPdpId); - // the context has to be closed before a call to FreePdp - __ASSERT_ALWAYS(!Context(aPdpId).PacketContext().SubSessionHandle(), User::Panic(KTxtSpudTel, KErrInUse)); - - delete iContexts[aPdpId]; - iContexts[aPdpId] = NULL; - + // In an OOM situation, this object may be cleaned up prior to establishment. + if (iContexts[aPdpId] != NULL) + { + // the context has to be closed before a call to FreePdp + __ASSERT_ALWAYS(!Context(aPdpId).PacketContext().SubSessionHandle(), User::Panic(KTxtSpudTel, KErrInUse)); + delete iContexts[aPdpId]; + iContexts[aPdpId] = NULL; + } }