summaryrefslogtreecommitdiff
path: root/lsp.c
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2023-01-04 19:51:13 -0500
committerpommicket <pommicket@gmail.com>2023-01-04 19:51:13 -0500
commitd9cc57e9ff1725e6e63973705adbf218d6961d17 (patch)
tree4c2eaa1e0b39a3387793299c52062996ee7be3ae /lsp.c
parent87b0da0d33d97abc0ba94ad18d988d370d09441b (diff)
fix command-line argument starting file if it doesn't exist
it used to open an untitled buffer. also, clarified buffer_load_file
Diffstat (limited to 'lsp.c')
-rw-r--r--lsp.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lsp.c b/lsp.c
index 877e56f..01dc2a3 100644
--- a/lsp.c
+++ b/lsp.c
@@ -421,6 +421,10 @@ static int lsp_communication_thread(void *data) {
}
u32 lsp_document_id(LSP *lsp, const char *path) {
+ if (!path) {
+ assert(0);
+ return 0;
+ }
SDL_LockMutex(lsp->document_mutex);
u32 *value = str_hash_table_get(&lsp->document_ids, path);
if (!value) {