javaextensions/sensor/src.s60/csensorbase.cpp
changeset 61 bf7ee68962da
parent 21 2a9601315dfc
child 64 0ea12c182930
--- 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)