mirror of
https://github.com/lbonn/rofi
synced 2024-11-24 04:43:03 +00:00
Fix crash on destroying script modi
This commit is contained in:
parent
f25288fc47
commit
96d8a23fde
1 changed files with 6 additions and 4 deletions
|
@ -415,9 +415,6 @@ static void cleanup ()
|
||||||
|
|
||||||
// Cleaning up memory allocated by the Xresources file.
|
// Cleaning up memory allocated by the Xresources file.
|
||||||
config_xresource_free ();
|
config_xresource_free ();
|
||||||
for ( unsigned int i = 0; i < num_modi; i++ ) {
|
|
||||||
mode_free ( &( modi[i] ) );
|
|
||||||
}
|
|
||||||
g_free ( modi );
|
g_free ( modi );
|
||||||
|
|
||||||
g_free ( config_path );
|
g_free ( config_path );
|
||||||
|
@ -549,7 +546,12 @@ static void rofi_collect_modi_destroy ( void )
|
||||||
{
|
{
|
||||||
for ( unsigned int i = 0; i < num_available_modi; i++ ) {
|
for ( unsigned int i = 0; i < num_available_modi; i++ ) {
|
||||||
if ( available_modi[i]->module ) {
|
if ( available_modi[i]->module ) {
|
||||||
g_module_close ( available_modi[i]->module );
|
GModule *mod = available_modi[i]->module;
|
||||||
|
available_modi[i] = NULL;
|
||||||
|
g_module_close ( mod );
|
||||||
|
}
|
||||||
|
if ( available_modi[i] ) {
|
||||||
|
mode_free ( &(available_modi[i]) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
g_free ( available_modi );
|
g_free ( available_modi );
|
||||||
|
|
Loading…
Reference in a new issue