Mercurial > hg > batmud > maputils
changeset 1838:2d96e2d518d2
Allow NULL wsi context in mapPerformSearch().
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 31 Oct 2017 19:42:28 +0200 |
parents | 2bf364642f2e |
children | 0402237b734e |
files | mapsearch.c |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mapsearch.c Tue Oct 31 19:41:38 2017 +0200 +++ b/mapsearch.c Tue Oct 31 19:42:28 2017 +0200 @@ -826,7 +826,10 @@ th_strbuf_puts(&buf, &bufSize, &bufLen, "]"); THMSG(2, "%s\n", buf); - lws_write(wsi, (unsigned char *) buf, bufLen, LWS_WRITE_TEXT); + + if (wsi != NULL) + lws_write(wsi, (unsigned char *) buf, bufLen, LWS_WRITE_TEXT); + th_free(buf); }