From 876555035a0ba61167180c0a59890e66d2d66902 Mon Sep 17 00:00:00 2001 From: "Yury V. Zaytsev" Date: Sun, 25 Aug 2024 13:21:00 +0200 Subject: [PATCH] Ticket #4576: fix visual glitches by avoiding `g_module_close` on `NULL` while loading `libaspell` Signed-off-by: Yury V. Zaytsev --- src/editor/spell.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/editor/spell.c b/src/editor/spell.c index 1f9aeba60f..b8c16903b1 100644 --- a/src/editor/spell.c +++ b/src/editor/spell.c @@ -174,8 +174,10 @@ spell_available (void) spell_module = g_module_open ("libaspell", G_MODULE_BIND_LAZY); - if (spell_module != NULL - && ASPELL_FUNCTION_AVAILABLE (new_aspell_config) + if (spell_module == NULL) + return FALSE; + + if (ASPELL_FUNCTION_AVAILABLE (new_aspell_config) && ASPELL_FUNCTION_AVAILABLE (aspell_dict_info_list_elements) && ASPELL_FUNCTION_AVAILABLE (aspell_dict_info_enumeration_next) && ASPELL_FUNCTION_AVAILABLE (new_aspell_speller)