mirror of
https://gitlab.freedesktop.org/plymouth/plymouth.git
synced 2026-05-09 07:08:01 +02:00
[details] detach from event loop when quitting
If the user has the details plugin configured, and the system does plymouth quit --retain-splash, then their may be a crash. This is because the plugin event loop exit handler will called after the plugin is destroyed. This commit makes sure the exit handler is removed before the plugin is freed.
This commit is contained in:
parent
56e6e7d0b9
commit
0e232e2976
1 changed files with 10 additions and 0 deletions
|
|
@ -67,6 +67,8 @@ typedef struct
|
|||
} view_t;
|
||||
|
||||
ply_boot_splash_plugin_interface_t *ply_boot_splash_plugin_get_interface (void);
|
||||
static void detach_from_event_loop (ply_boot_splash_plugin_t *plugin);
|
||||
|
||||
struct _ply_boot_splash_plugin
|
||||
{
|
||||
ply_event_loop_t *loop;
|
||||
|
|
@ -141,6 +143,14 @@ destroy_plugin (ply_boot_splash_plugin_t *plugin)
|
|||
if (plugin == NULL)
|
||||
return;
|
||||
|
||||
if (plugin->loop != NULL)
|
||||
{
|
||||
ply_event_loop_stop_watching_for_exit (plugin->loop, (ply_event_loop_exit_handler_t)
|
||||
detach_from_event_loop,
|
||||
plugin);
|
||||
detach_from_event_loop (plugin);
|
||||
}
|
||||
|
||||
free_views (plugin);
|
||||
|
||||
free (plugin);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue