Crash after unpairing BT keyboard

The crash is caused to access an array use invalid index value.
The solution is to check the index before access the array.
bug:10992001

Change-Id: Iad83764de9545fb2348105cf9cd9d32a85f1d654
1 file changed