MouseEventManager: fix for potential crash