[gnome-contacts/nielsdg/fix-crashes-for-null-termiantor] editor: make sure properties have null terminator




commit 85554186e29ba1993afd5e430ff2dd74c6263345
Author: Niels De Graef <nielsdegraef gmail com>
Date:   Tue Sep 13 19:42:02 2022 +0000

    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 {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]