Fixed NULL pointer dereference (in printf) when connected to a non-socket (which I do quite often when testing stuff).