fix crash in NewEventDispatcherTest.cpp on vs