Blob Blame History Raw
From 85554186e29ba1993afd5e430ff2dd74c6263345 Mon Sep 17 00:00:00 2001
From: Niels De Graef <nielsdegraef@gmail.com>
Date: Tue, 13 Sep 2022 19:42:02 +0000
Subject: [PATCH] editor: make sure properties have null terminator

We thought that Vala would properly know about a normal `string[]` and
null-terminated `string[]`, but apparently it doesn't. Worse, it seems
that on systems it knows how to deal with this, but not on other
systems where it just crashes.

Fixes: https://gitlab.gnome.org/GNOME/gnome-contacts/-/issues/266
---
 src/contacts-contact-editor.vala | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/contacts-contact-editor.vala b/src/contacts-contact-editor.vala
index 1cca90fd..f3f20f25 100644
--- a/src/contacts-contact-editor.vala
+++ b/src/contacts-contact-editor.vala
@@ -168,6 +168,7 @@ public class Contacts.PersonaEditor : Gtk.Widget {
   public const string[] IMPORTANT_PROPERTIES = {
     "email-addresses",
     "phone-numbers",
+    null
   };
 
   public const string[] SUPPORTED_PROPERTIES = {
@@ -181,6 +182,7 @@ public class Contacts.PersonaEditor : Gtk.Widget {
     "postal-addresses",
     "roles",
     "urls",
+    null
   };
 
   construct {
-- 
GitLab