mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-22 02:48:08 +01:00
lib: call g_type_init from notmuch_database_open
We want to make sure g_type_init is called before any GObject functionality is used.
This commit is contained in:
parent
398b94bb39
commit
69dc421ab3
1 changed files with 4 additions and 0 deletions
|
@ -26,6 +26,7 @@
|
|||
#include <signal.h>
|
||||
|
||||
#include <glib.h> /* g_free, GPtrArray, GHashTable */
|
||||
#include <glib-object.h> /* g_type_init */
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
@ -600,6 +601,9 @@ notmuch_database_open (const char *path,
|
|||
goto DONE;
|
||||
}
|
||||
|
||||
/* Initialize the GLib type system and threads */
|
||||
g_type_init ();
|
||||
|
||||
notmuch = talloc (NULL, notmuch_database_t);
|
||||
notmuch->exception_reported = FALSE;
|
||||
notmuch->path = talloc_strdup (notmuch, path);
|
||||
|
|
Loading…
Reference in a new issue