From 153544c8b2532b0290fdbaa792ef447b4813f90a Mon Sep 17 00:00:00 2001 From: Ian Gulliver Date: Sat, 27 Feb 2016 22:03:56 -0800 Subject: [PATCH] Fix crash sending protocols without a greeting. --- adsbus/send.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/adsbus/send.c b/adsbus/send.c index 42b2255..551cc0d 100644 --- a/adsbus/send.c +++ b/adsbus/send.c @@ -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) {