Ticket #4576: 0001-Ticket-4576-fix-visual-glitches-by-avoiding-g_module.patch

File 0001-Ticket-4576-fix-visual-glitches-by-avoiding-g_module.patch, 1.1 KB (added by zaytsev, 3 months ago)
  • src/editor/spell.c

    From 05c58fc1b48cc463c33c53a0f789632558308be3 Mon Sep 17 00:00:00 2001
    From: "Yury V. Zaytsev" <yury@shurup.com>
    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 <yury@shurup.com>
    ---
     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 1f9aeba60..b8c16903b 100644
    a b spell_available (void) 
    174174 
    175175    spell_module = g_module_open ("libaspell", G_MODULE_BIND_LAZY); 
    176176 
    177     if (spell_module != NULL 
    178         && ASPELL_FUNCTION_AVAILABLE (new_aspell_config) 
     177    if (spell_module == NULL) 
     178        return FALSE; 
     179 
     180    if (ASPELL_FUNCTION_AVAILABLE (new_aspell_config) 
    179181        && ASPELL_FUNCTION_AVAILABLE (aspell_dict_info_list_elements) 
    180182        && ASPELL_FUNCTION_AVAILABLE (aspell_dict_info_enumeration_next) 
    181183        && ASPELL_FUNCTION_AVAILABLE (new_aspell_speller)