[gnome-builder] langserv: be tolerant of NULL notification params
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] langserv: be tolerant of NULL notification params
- Date: Thu, 1 Feb 2018 23:49:40 +0000 (UTC)
commit 60d758da641010be24b49f2dd7d02e44fc9d4c8b
Author: Christian Hergert <chergert redhat com>
Date: Thu Feb 1 15:48:47 2018 -0800
langserv: be tolerant of NULL notification params
We can't guarantee this because it comes from the peer, and they are
certainly free to send null for the params field.
Fixes #390
src/libide/langserv/ide-langserv-client.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/src/libide/langserv/ide-langserv-client.c b/src/libide/langserv/ide-langserv-client.c
index 2cf1cde08..ce3a6566e 100644
--- a/src/libide/langserv/ide-langserv-client.c
+++ b/src/libide/langserv/ide-langserv-client.c
@@ -618,10 +618,12 @@ ide_langserv_client_real_notification (IdeLangservClient *self,
g_assert (IDE_IS_LANGSERV_CLIENT (self));
g_assert (method != NULL);
- g_assert (params != NULL);
- if (g_str_equal (method, "textDocument/publishDiagnostics"))
- ide_langserv_client_text_document_publish_diagnostics (self, params);
+ if (params != NULL)
+ {
+ if (g_str_equal (method, "textDocument/publishDiagnostics"))
+ ide_langserv_client_text_document_publish_diagnostics (self, params);
+ }
IDE_EXIT;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]