Fix possible segfault in `peer::dispose`