akntouchgesturefw/src/akntouchgesturefwpointerstate.cpp
branchRCL_3
changeset 59 978afdc0236f
parent 0 2f259fa3e83a
--- a/akntouchgesturefw/src/akntouchgesturefwpointerstate.cpp	Wed Sep 01 12:16:19 2010 +0100
+++ b/akntouchgesturefw/src/akntouchgesturefwpointerstate.cpp	Tue Sep 14 21:48:24 2010 +0300
@@ -142,9 +142,11 @@
 //
 TPoint* CAknTouchGestureFwPointerState::FirstPointerPosition()
     {
-    __ASSERT_ALWAYS( iFirstPointerNumber != KInvalidPointerNumber,
+    __ASSERT_DEBUG( iFirstPointerNumber != KInvalidPointerNumber,
         User::Invariant() );
-    return &iPointerData[ iFirstPointerNumber ].iPosition;
+	
+	// If iFirstPointerNumber is invalid, use default index instead.
+    return &iPointerData[ iFirstPointerNumber == KInvalidPointerNumber ? 0 : iFirstPointerNumber ].iPosition;
     }
 
 
@@ -154,9 +156,11 @@
 //
 TPoint* CAknTouchGestureFwPointerState::SecondPointerPosition()
     {
-    __ASSERT_ALWAYS( iSecondPointerNumber != KInvalidPointerNumber,
+    __ASSERT_DEBUG( iSecondPointerNumber != KInvalidPointerNumber,
         User::Invariant() );
-    return &iPointerData[ iSecondPointerNumber ].iPosition;
+		
+	// If iSecondPointerNumber is invalid, use default index instead.
+    return &iPointerData[ iSecondPointerNumber == KInvalidPointerNumber ? 1 : iSecondPointerNumber ].iPosition;
     }