diff -r e0d6e9bd3ca7 -r bf7ee68962da javaextensions/sensor/src.s60/csensorbase.cpp --- a/javaextensions/sensor/src.s60/csensorbase.cpp Tue Jul 06 14:10:26 2010 +0300 +++ b/javaextensions/sensor/src.s60/csensorbase.cpp Wed Aug 18 09:43:15 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)