diff options
author | Marc-Antoine Perennou <Marc-Antoine@Perennou.com> | 2019-12-03 16:15:16 +0100 |
---|---|---|
committer | Richard Hughes <richard@hughsie.com> | 2019-12-03 16:01:03 +0000 |
commit | 5def781182f34825eab77800e44a299984dcf17d (patch) | |
tree | 8153144d98035a5a8b4518649c2d1b74525f0921 | |
parent | 9215030085873ff4317d2f1c47c3455194cd42d7 (diff) | |
download | appstream-glib-5def781182f34825eab77800e44a299984dcf17d.tar.gz |
as-app: properly initialize unique_id_mutex
We are using it, clearing it, but e never initialize it.
For some reasons it seems to work, not sure how or why,
but when glib is uilt with clang, then the problem
surfaces and we get a nice segmentation fault.
Properly initializing it fixes this
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
-rw-r--r-- | libappstream-glib/as-app.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libappstream-glib/as-app.c b/libappstream-glib/as-app.c index 7bc0bf9..d24b2f0 100644 --- a/libappstream-glib/as-app.c +++ b/libappstream-glib/as-app.c @@ -524,6 +524,7 @@ as_app_init (AsApp *app) priv->urls = g_hash_table_new_full (g_str_hash, g_str_equal, (GDestroyNotify) as_ref_string_unref, (GDestroyNotify) as_ref_string_unref); + g_mutex_init (&priv->unique_id_mutex); priv->token_cache = g_hash_table_new_full (g_str_hash, g_str_equal, (GDestroyNotify) as_ref_string_unref, g_free); |