diff -r 35baca0e7a2e -r 023eef975703 javaextensions/sensor/src.s60/csensorbase.cpp --- a/javaextensions/sensor/src.s60/csensorbase.cpp Tue Jul 06 20:36:19 2010 +0300 +++ b/javaextensions/sensor/src.s60/csensorbase.cpp Fri Jul 09 16:35:45 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)