diff -r e5618cc85d74 -r 6c158198356e javaextensions/sensor/src.s60/csensorbase.cpp --- a/javaextensions/sensor/src.s60/csensorbase.cpp Thu Jul 15 18:31:06 2010 +0300 +++ b/javaextensions/sensor/src.s60/csensorbase.cpp Thu Aug 19 09:48:13 2010 +0300 @@ -139,7 +139,14 @@ void CSensorBase::AsyncCallback(TMethod aMethod) { JELOG2(ESensor); - iMethodArray.Append(aMethod); + TInt err = iMethodArray.Append(aMethod); + // if there was error when adding the method to array then just return + if ( err ) + { + ELOG2(ESensor, "CSensorBase::AsyncCallback - Error (code = %d) when " + "adding method (type = %d) to method buffer.", err, aMethod.iMethodType); + return; + } // If there is old request ongoing, wait it for completion if (iMethodArray.Count() > 1)