[PATCH] [details] Handle NULL boot_buffer
Colin Watson
cjwatson at ubuntu.com
Wed Apr 28 05:31:39 PDT 2010
boot_buffer may be NULL if plymouthd failed to attach to the console
session (e.g. if booting without an initramfs so /dev/pts isn't mounted
yet). Handle this gracefully rather than segfaulting.
---
src/plugins/splash/details/plugin.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/plugins/splash/details/plugin.c b/src/plugins/splash/details/plugin.c
index 05eddc6..fd8d2b8 100644
--- a/src/plugins/splash/details/plugin.c
+++ b/src/plugins/splash/details/plugin.c
@@ -250,9 +250,12 @@ show_splash_screen (ply_boot_splash_plugin_t *plugin,
detach_from_event_loop,
plugin);
- size = ply_buffer_get_size (boot_buffer);
+ if (boot_buffer)
+ {
+ size = ply_buffer_get_size (boot_buffer);
- write_on_views (plugin, ply_buffer_get_bytes (boot_buffer), size);
+ write_on_views (plugin, ply_buffer_get_bytes (boot_buffer), size);
+ }
return true;
}
--
1.7.0.4
More information about the plymouth
mailing list