updated: [master] [8765550] Ticket #4576: fix visual glitches by avoiding `g_module_close` on `NULL` while loading `libaspell`

1 view
Skip to first unread message

Yury V. Zaytsev

unread,
Aug 25, 2024, 11:36:25 AM8/25/24
to mc-co...@googlegroups.com
The following commit has been merged in the master branch:
commit 876555035a0ba61167180c0a59890e66d2d66902
Author: Yury V. Zaytsev <yu...@shurup.com>
Date: Sun Aug 25 13:21:00 2024 +0200

Ticket #4576: fix visual glitches by avoiding `g_module_close` on `NULL` while loading `libaspell`

Signed-off-by: Yury V. Zaytsev <yu...@shurup.com>

diff --git a/src/editor/spell.c b/src/editor/spell.c
index 1f9aeba..b8c1690 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)

--
Midnight Commander Development
Reply all
Reply to author
Forward
0 new messages