mirror of
https://gitlab.freedesktop.org/plymouth/plymouth.git
synced 2026-05-07 18:58:01 +02:00
main: if deactivate when already deactivated return immediately
We were trying to ignore second deactivate requests, but were instead crashing because we're trying to use a nullified trigger. This commit makes sure things don't go crashy when a user does "plymouth deactivate" on an already deactivated plymouthd.
This commit is contained in:
parent
f3b9d25f29
commit
6ccedf7b6e
1 changed files with 7 additions and 1 deletions
|
|
@ -1135,7 +1135,13 @@ static void
|
|||
on_deactivate (state_t *state,
|
||||
ply_trigger_t *deactivate_trigger)
|
||||
{
|
||||
if ((state->deactivate_trigger != NULL) || state->is_inactive)
|
||||
if (state->is_inactive)
|
||||
{
|
||||
ply_trigger_pull (deactivate_trigger, NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
if (state->deactivate_trigger != NULL)
|
||||
{
|
||||
ply_trigger_add_handler (state->deactivate_trigger,
|
||||
(ply_trigger_handler_t)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue