diff --git a/src/plugins/splash/details/plugin.c b/src/plugins/splash/details/plugin.c index fd8d2b8e..763e128f 100644 --- a/src/plugins/splash/details/plugin.c +++ b/src/plugins/splash/details/plugin.c @@ -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);