Avoids an NPE if the preview manager's server is null
Avoids deadlocking the UI when disconnecting an ldap connection profile

* See inline comment