summaryrefslogtreecommitdiff
path: root/buffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'buffer.c')
-rw-r--r--buffer.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/buffer.c b/buffer.c
index 8079bf5..b4c85d5 100644
--- a/buffer.c
+++ b/buffer.c
@@ -312,6 +312,8 @@ static void buffer_send_lsp_did_open(TextBuffer *buffer, LSP *lsp, char *buffer_
}
LSP *buffer_lsp(TextBuffer *buffer) {
+ if (!buffer)
+ return NULL;
if (!buffer_is_named_file(buffer))
return NULL;
if (buffer->view_only)