Fix for the crash that was caused when accessing UlpProxy

Changes to ensure that we dont free UlpProxy object
by mistake when loc_init is invoked twice.
CRs-Fixed: 532599
Change-Id: I0989368b67614181b3d834e61690211497663352
This commit is contained in:
Satheesh Jayakumar 2013-08-21 17:46:13 -07:00
parent 7d8ec9155e
commit 961d1bdae7

View file

@ -90,6 +90,11 @@ LocEngAdapter::~LocEngAdapter()
void LocEngAdapter::setUlpProxy(UlpProxyBase* ulp)
{
if (ulp == mUlp) {
//This takes care of the case when double initalization happens
//and we get the same object back for UlpProxyBase . Do nothing
return;
}
delete mUlp;
LOC_LOGV("%s] %p", __func__, ulp);
if (NULL == ulp) {