modules/dialog_ng: prevent seg fault if socket struct is null