summaryrefslogtreecommitdiff
path: root/ide-hover.c
diff options
context:
space:
mode:
Diffstat (limited to 'ide-hover.c')
-rw-r--r--ide-hover.c5
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
&& (