mirror of
https://gitlab.freedesktop.org/plymouth/plymouth.git
synced 2026-05-05 09:58:04 +02:00
ply-terminal: Fix crash on vt-less kernels when checking the enabled state
This commit is contained in:
parent
d6e6366d62
commit
63597f92d1
1 changed files with 3 additions and 3 deletions
|
|
@ -241,7 +241,7 @@ ply_terminal_set_unbuffered_input (ply_terminal_t *terminal)
|
|||
|
||||
ply_terminal_unlock (terminal);
|
||||
|
||||
if (terminal->is_disabled) {
|
||||
if (terminal && terminal->is_disabled) {
|
||||
ply_trace ("terminal input is getting enabled in unbuffered mode");
|
||||
|
||||
if (ply_terminal_is_vt (terminal))
|
||||
|
|
@ -280,7 +280,7 @@ ply_terminal_set_buffered_input (ply_terminal_t *terminal)
|
|||
{
|
||||
struct termios term_attributes;
|
||||
|
||||
if (terminal->is_disabled) {
|
||||
if (terminal && terminal->is_disabled) {
|
||||
ply_trace ("terminal input is getting enabled in buffered mode");
|
||||
|
||||
if (ply_terminal_is_vt (terminal))
|
||||
|
|
@ -332,7 +332,7 @@ ply_terminal_set_buffered_input (ply_terminal_t *terminal)
|
|||
bool
|
||||
ply_terminal_set_disabled_input (ply_terminal_t *terminal)
|
||||
{
|
||||
if (!terminal->is_disabled) {
|
||||
if (terminal && !terminal->is_disabled) {
|
||||
ply_trace ("terminal input is getting disabled from %s mode",
|
||||
terminal->is_unbuffered? "unbuffered" : "buffered");
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue