Index: remoting/client/jni/jni_interface.cc |
diff --git a/remoting/client/jni/jni_interface.cc b/remoting/client/jni/jni_interface.cc |
index 5ca45a013cffc1e237051b18d912bf7e10d1daa8..088ac82a42f762c71c01038aaf8f78a518a8248e 100644 |
--- a/remoting/client/jni/jni_interface.cc |
+++ b/remoting/client/jni/jni_interface.cc |
@@ -120,6 +120,9 @@ JNIEXPORT void JNICALL JNI_IMPLEMENTATION(mouseActionNative)( |
jint y, |
jint which_button, |
jboolean button_down) { |
+ // Button must be within the bounds of the MouseEvent_MouseButton enum. |
+ DCHECK(which_button >= 0 && which_button < 5); |
+ |
remoting::ChromotingJniRuntime::GetInstance()->session()->PerformMouseAction( |
x, |
y, |