boot-splash: don't crash in free if module not loaded

ply_boot_splash_free currently calls some code that depends
on a module being loaded.  We call ply_boot_splash_free to
clean up the boot splash object if a module can't be loaded,
leading to crash.

This commit addresses that issue by only calling the module
specific destruction code in ply_boot_splash_free in the case
where a module is loaded.

https://bugs.freedesktop.org/show_bug.cgi?id=91590
This commit is contained in:
Ray Strode 2015-08-10 10:11:32 -04:00
parent 77d303d07b
commit f80684387a

View file

@ -401,16 +401,17 @@ ply_boot_splash_free (ply_boot_splash_t *splash)
splash);
}
ply_boot_splash_unset_keyboard (splash);
if (splash->module_handle != NULL) {
ply_boot_splash_unset_keyboard (splash);
remove_pixel_displays (splash);
ply_list_free (splash->pixel_displays);
remove_pixel_displays (splash);
ply_list_free (splash->pixel_displays);
remove_text_displays (splash);
ply_list_free (splash->text_displays);
remove_text_displays (splash);
ply_list_free (splash->text_displays);
if (splash->module_handle != NULL)
ply_boot_splash_unload (splash);
}
if (splash->idle_trigger != NULL)
ply_trigger_free (splash->idle_trigger);