From: Colin Watson Date: Wed, 28 Apr 2010 12:31:39 +0000 (+0100) Subject: Handle NULL boot_buffer X-Git-Tag: 0.8.3~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c859e580a197a121bb5666fe2628b38ec88da9e4;p=thirdparty%2Fplymouth.git Handle NULL boot_buffer 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. --- diff --git a/src/plugins/splash/details/plugin.c b/src/plugins/splash/details/plugin.c index 05eddc61..fd8d2b8e 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; }