mirror of
https://gitlab.freedesktop.org/plymouth/plymouth.git
synced 2026-05-07 06:08:00 +02:00
ply-console-viewer: Don't crash if passed a NULL format
The splash plugins currently call ply_console_viewer_print (... NULL); if no prompt message is specified... This leads to crash. Rather than fixing all the splash plugins, this commit just makes a NULL format be a noop.
This commit is contained in:
parent
d7c2e3a4ac
commit
606f8c232b
1 changed files with 3 additions and 0 deletions
|
|
@ -341,6 +341,9 @@ ply_console_viewer_print (ply_console_viewer_t *console_viewer,
|
|||
char *buffer = NULL;
|
||||
int length;
|
||||
|
||||
if (format == NULL)
|
||||
return;
|
||||
|
||||
va_start (arguments, format);
|
||||
length = vsnprintf (NULL, 0, format, arguments);
|
||||
if (length > 0)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue