From 8e6609e0f56d426cbfd26667629ef4995f4fc015 Mon Sep 17 00:00:00 2001 From: Techatrix <19954306+Techatrix@users.noreply.github.com> Date: Tue, 7 Mar 2023 12:28:20 +0100 Subject: [PATCH] skip failed cimports on garbage collection --- src/DocumentStore.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/DocumentStore.zig b/src/DocumentStore.zig index 4cf44ae..d829c46 100644 --- a/src/DocumentStore.zig +++ b/src/DocumentStore.zig @@ -345,7 +345,7 @@ fn garbageCollectionCImports(self: *DocumentStore) error{OutOfMemory}!void { for (self.handles.values()) |handle| { for (handle.cimports.items(.hash)) |hash| { - const index = self.cimports.getIndex(hash).?; + const index = self.cimports.getIndex(hash) orelse continue; reachable.set(index); } }