Skip to content
  • Maximiliano's avatar
    io-error-info-bar: Check len > 0 before removing · ff85c82c
    Maximiliano authored
    Otherwise we get an error:
    
        (gtranslator:21): GLib-CRITICAL **: 23:34:51.486: g_array_remove_index: assertion 'index_ < array->len' failed
    
    to reproduce: Open from D-L a po file with plural forms that don't match
    the profile's and quickly close the 3 toasts.
    
    Since we use g_strdup, we have to use `gchar *` instead of `const gchar`
    on the msg struct.
    
    We also move the g_frees to a clear_func otherwise they caused a double free.
    ff85c82c