Fix crash sending protocols without a greeting.

This commit is contained in:
Ian Gulliver
2016-02-27 22:03:56 -08:00
parent 4f0b2c82e9
commit 153544c8b2

View File

@@ -138,7 +138,9 @@ void send_new_wrapper(int fd, void *passthrough, struct peer *on_close) {
void send_hello(struct buf **buf_pp, void *passthrough) {
struct serializer *serializer = (struct serializer *) passthrough;
serializer->hello(buf_pp);
if (serializer->hello) {
serializer->hello(buf_pp);
}
}
void send_write(struct packet *packet) {