Fix a possible crash when the listener is null

Test: manual
Bug: 129930804
Change-Id: Id598ae1d98154b19d156e52973cf379669e7060c
5 files changed