Exception of focus event after upgraded to 3.4.0

Exception of focus event after upgraded to 3.4.0

It will get a exception after a focus event sometimes.
Appears after upgraded to 3.4.0.