Made connector conditional.

This is required to avoid a warning as glaUns.T is not used if there is no window.