}
void x11_close (Socket s) {
- struct X11Private *pr = (struct X11Private *)sk_get_private_ptr(s);
+ struct X11Private *pr;\r
+ if (!s)\r
+ return;\r
+ pr = (struct X11Private *)sk_get_private_ptr(s);
if (pr->auth_protocol) {
sfree(pr->auth_protocol);