issue #2087: [EventDispatcher] Fixing crash on Win32.
Merge pull request #3705 from dumganhar/iss2087-new-event-dispatcher

issue #2087: [EventDispatcher] Fixing crash on Win32.