aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/nvim/os/provider.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/nvim/os/provider.c b/src/nvim/os/provider.c
index 99cc078e94..d94203f683 100644
--- a/src/nvim/os/provider.c
+++ b/src/nvim/os/provider.c
@@ -158,8 +158,10 @@ static uint64_t get_provider_for(char *method)
err:
// Ensure we won't try to restart the provider
- f->bootstrap_command = NULL;
- f->channel_id = 0;
+ if (f) {
+ f->bootstrap_command = NULL;
+ f->channel_id = 0;
+ }
return 0;
}