fix use after free (#911)

This commit is contained in:
Alex Kladov 2023-01-11 20:18:37 +00:00 committed by GitHub
parent 20d29fd491
commit 61fa98065f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -694,7 +694,7 @@ fn createDocument(self: *DocumentStore, uri: Uri, text: [:0]u8, open: bool) erro
handle.associated_build_file = gop.key_ptr.*; handle.associated_build_file = gop.key_ptr.*;
break; break;
} else if (handle.associated_build_file == null) { } else if (handle.associated_build_file == null) {
handle.associated_build_file = build_file_uri; handle.associated_build_file = gop.key_ptr.*;
} }
} }
} }