summaryrefslogtreecommitdiff
path: root/lsp.c
diff options
context:
space:
mode:
Diffstat (limited to 'lsp.c')
-rw-r--r--lsp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lsp.c b/lsp.c
index 583c822..0b3b44b 100644
--- a/lsp.c
+++ b/lsp.c
@@ -439,6 +439,8 @@ const char *lsp_document_path(LSP *lsp, LSPDocumentID document) {
assert(0);
return "";
}
+ // it's okay to keep a pointer to this around without the mutex locked
+ // we'll never change the path of a document ID.
const char *path = lsp->document_data[document].path;
SDL_UnlockMutex(lsp->document_mutex);
return path;