EventHandler: Avoid a non-valid access to memory

Change-Id: I8ede4fcdf9bbd898c064b5ab5418607646c9f750