[gnome-builder] vala-pack: fix some g_warning()
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] vala-pack: fix some g_warning()
- Date: Fri, 26 Apr 2019 06:58:52 +0000 (UTC)
commit 048b04369d48b9cd376905f4c898aeb9b940e98d
Author: Christian Hergert <chergert redhat com>
Date: Thu Apr 25 23:56:30 2019 -0700
vala-pack: fix some g_warning()
src/plugins/vala-pack/lang-server/gnome-builder-vala.vala | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/src/plugins/vala-pack/lang-server/gnome-builder-vala.vala
b/src/plugins/vala-pack/lang-server/gnome-builder-vala.vala
index 17315c6eb..95c3c81f0 100644
--- a/src/plugins/vala-pack/lang-server/gnome-builder-vala.vala
+++ b/src/plugins/vala-pack/lang-server/gnome-builder-vala.vala
@@ -236,7 +236,11 @@ namespace Ide
string[] flags = {};
Jsonrpc.Message.parse (params, "flags", Jsonrpc.Message.GetStrv.create (ref flags));
- flags.length = (int) GLib.strv_length (flags);
+
+ if (flags != null)
+ flags.length = (int) GLib.strv_length (flags);
+ else
+ flags.length = 0;
GLib.Variant index_entries;
lock (index) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]