Merge "Fix NPE in KeyDetector"
This commit is contained in:
commit
0d69557f14
1 changed files with 3 additions and 0 deletions
|
@ -86,6 +86,9 @@ public class KeyDetector {
|
||||||
* @return the key that the touch point hits.
|
* @return the key that the touch point hits.
|
||||||
*/
|
*/
|
||||||
public Key detectHitKey(final int x, final int y) {
|
public Key detectHitKey(final int x, final int y) {
|
||||||
|
if (mKeyboard == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
final int touchX = getTouchX(x);
|
final int touchX = getTouchX(x);
|
||||||
final int touchY = getTouchY(y);
|
final int touchY = getTouchY(y);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue