aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-10-17 05:59:26 -0400
committerBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-10-17 05:59:26 -0400
commitd58eae8b232dca30f3fc2e0a5eeee3822c673cfb (patch)
tree3f5d04ff73fd03d06178bc96d3852e0a22868835 /src
parent5ca256c325a1a122d838e095e392ca00c39a632e (diff)
Only check unused imports if the document is not nil on save
Diffstat (limited to 'src')
-rw-r--r--src/server/requests.odin5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/server/requests.odin b/src/server/requests.odin
index b42a3e3..7253063 100644
--- a/src/server/requests.odin
+++ b/src/server/requests.odin
@@ -1145,8 +1145,9 @@ notification_did_save :: proc(
check(config.profile.checker_path[:], corrected_uri, config)
document := document_get(save_params.textDocument.uri)
-
- check_unused_imports(document, config)
+ if document != nil {
+ check_unused_imports(document, config)
+ }
push_diagnostics(writer)