mirror of
https://gitlab.freedesktop.org/plymouth/plymouth.git
synced 2026-05-09 02:28:19 +02:00
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.
This commit is contained in:
parent
7021306e43
commit
c859e580a1
1 changed files with 5 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue