last vertex related touch-ups.

* only attempt if no window global exists
* encapsulate attempt in function call to limit the impact of the try/catch