fade-throbber,space-flares,two-step: Don't crash if no console viewer

The splash plugins don't create a console viewer if
`plymouth.prefer-fbcon` is on the kernel command line, but expect it
to be not NULL regardless.

This commit corrects that misconception.
This commit is contained in:
Ray Strode 2023-12-27 14:50:09 -05:00
parent c835c7ff53
commit 7003f17229
3 changed files with 9 additions and 0 deletions

View file

@ -135,6 +135,9 @@ view_show_prompt_on_console_viewer (view_t *view,
{
ply_boot_splash_plugin_t *plugin = view->plugin;
if (view->console_viewer == NULL)
return;
if (plugin->state == PLY_BOOT_SPLASH_DISPLAY_NORMAL)
ply_console_viewer_print (view->console_viewer, "\n");

View file

@ -462,6 +462,9 @@ view_show_prompt_on_console_viewer (view_t *view,
{
ply_boot_splash_plugin_t *plugin = view->plugin;
if (view->console_viewer == NULL)
return;
if (plugin->state == PLY_BOOT_SPLASH_DISPLAY_NORMAL)
ply_console_viewer_print (view->console_viewer, "\n");

View file

@ -967,6 +967,9 @@ view_show_prompt_on_console_viewer (view_t *view,
{
ply_boot_splash_plugin_t *plugin = view->plugin;
if (view->console_viewer == NULL)
return;
if (plugin->state == PLY_BOOT_SPLASH_DISPLAY_NORMAL)
ply_console_viewer_print (view->console_viewer, "\n");