Fixes crash of PerformanceTest/EventDispatcherTest.
Merge pull request #5536 from dumganhar/develop

Fixes crash of PerformanceTest/EventDispatcherTest.