[gspell] language: add a few assertions



commit 26efd580069e18494d4369714b227e8082e6a5a1
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Sun Dec 27 18:39:08 2015 +0100

    language: add a few assertions

 gspell/gspell-language.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/gspell/gspell-language.c b/gspell/gspell-language.c
index a98336e..2d8c7c5 100644
--- a/gspell/gspell-language.c
+++ b/gspell/gspell-language.c
@@ -358,11 +358,13 @@ gspell_language_get_available (void)
 
        g_free (localedir);
 
+       g_assert (iso_639_table == NULL);
        iso_639_table = g_hash_table_new_full (g_str_hash,
                                               g_str_equal,
                                               (GDestroyNotify) g_free,
                                               (GDestroyNotify) g_free);
 
+       g_assert (iso_3166_table == NULL);
        iso_3166_table = g_hash_table_new_full (g_str_hash,
                                                g_str_equal,
                                                (GDestroyNotify) g_free,


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