avoid possible leak in case of event with bad vertex, discovered by coverity