diff -r 962e6306d9d2 -r 7ef16719d8cb telephonyprotocols/pdplayer/umts/spudtel/src/ceteldriverfactory.cpp --- a/telephonyprotocols/pdplayer/umts/spudtel/src/ceteldriverfactory.cpp Fri Feb 19 23:59:33 2010 +0200 +++ b/telephonyprotocols/pdplayer/umts/spudtel/src/ceteldriverfactory.cpp Fri Mar 12 15:49:38 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; + } }