check in event destructor for deleted parent mesh to avoid segfaults if the event is deleted after the mesh