[Android] SlidingMenu: fix a pointerIndex crash

Jean-Baptiste Kempf git at videolan.org
Tue Oct 30 11:13:09 CET 2012


vlc-ports/android | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Tue Oct 30 12:12:54 2012 +0100| [2502a76dc8f252015015f6024294f42ea28216eb] | committer: Jean-Baptiste Kempf

SlidingMenu: fix a pointerIndex crash

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=2502a76dc8f252015015f6024294f42ea28216eb
---

 java-libs/SlidingMenu/src/com/slidingmenu/lib/CustomViewAbove.java |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java-libs/SlidingMenu/src/com/slidingmenu/lib/CustomViewAbove.java b/java-libs/SlidingMenu/src/com/slidingmenu/lib/CustomViewAbove.java
index 7c067fc..455a5cb 100644
--- a/java-libs/SlidingMenu/src/com/slidingmenu/lib/CustomViewAbove.java
+++ b/java-libs/SlidingMenu/src/com/slidingmenu/lib/CustomViewAbove.java
@@ -780,7 +780,7 @@ public class CustomViewAbove extends ViewGroup {
 		switch (action) {
 		case MotionEvent.ACTION_MOVE:
 			final int activePointerId = mActivePointerId;
-			if (activePointerId == INVALID_POINTER)
+			if (activePointerId == INVALID_POINTER || activePointerId >= ev.getPointerCount())
 				break;
 
 			final int pointerIndex = MotionEventCompat.findPointerIndex(ev, activePointerId);



More information about the Android mailing list