diff options
Diffstat (limited to 'ide-hover.c')
-rw-r--r-- | ide-hover.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ide-hover.c b/ide-hover.c index f99c2e7..2be04ca 100644 --- a/ide-hover.c +++ b/ide-hover.c @@ -46,7 +46,10 @@ void hover_process_lsp_response(Ted *ted, LSPResponse *response) { TextBuffer *buffer=0; LSPDocumentPosition pos={0}; LSP *lsp=0; - get_hover_position(ted, &pos, &buffer, &lsp); + if (!get_hover_position(ted, &pos, &buffer, &lsp)) { + free(hover->text); hover->text = NULL; + return; + } if (hover->text // we already have hover text && ( |