]> git.notmuchmail.org Git - notmuch/commitdiff
Add missing call to g_type_init()
authorAaron Ecay <aaronecay@gmail.com>
Mon, 25 Jul 2011 23:38:58 +0000 (19:38 -0400)
committerDavid Bremner <bremner@debian.org>
Sat, 10 Sep 2011 18:19:51 +0000 (15:19 -0300)
The Glib docs state "Prior to any use of the type system, g_type_init() has to
be called".[1] To not do so can lead to segfaults.  The g_type system is
currently used by various "filters" that operate on uuencoded text, message
headers, etc.

[1] http://developer.gnome.org/gobject/2.28/gobject-Type-Information.html#g-type-init

notmuch.c

index 3973e350d06391935d5829ff9fa171bd091d014e..f9d66297f044971b034521d2e5c916b4a5aee77f 100644 (file)
--- a/notmuch.c
+++ b/notmuch.c
@@ -579,6 +579,7 @@ main (int argc, char *argv[])
     local = talloc_new (NULL);
 
     g_mime_init (0);
+    g_type_init ();
 
     if (argc == 1)
        return notmuch (local);