diff options
-rw-r--r-- | src/nvim/ui_bridge.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/nvim/ui_bridge.c b/src/nvim/ui_bridge.c index 2ec31de5e1..58345b5efa 100644 --- a/src/nvim/ui_bridge.c +++ b/src/nvim/ui_bridge.c @@ -233,8 +233,11 @@ static void ui_bridge_highlight_set_event(void **argv) static void ui_bridge_put(UI *b, uint8_t *text, size_t size) { - uint8_t *t = xmalloc(8); - memcpy(t, text, size); + uint8_t *t = NULL; + if (text) { + t = xmalloc(8); + memcpy(t, text, size); + } UI_CALL(b, put, 3, b, t, INT2PTR(size)); } static void ui_bridge_put_event(void **argv) |