mirror of
https://gitlab.freedesktop.org/plymouth/plymouth.git
synced 2026-05-08 14:48:01 +02:00
progress-animation: fail load if there are no frames
If there are no progress animation frames we need to fail from the load function so plugins can deal with it gracefully..
This commit is contained in:
parent
4c233ce2cb
commit
6e76f71ca4
1 changed files with 13 additions and 1 deletions
|
|
@ -347,6 +347,7 @@ ply_progress_animation_add_frames (ply_progress_animation_t *progress_animation)
|
|||
{
|
||||
struct dirent **entries;
|
||||
int number_of_entries;
|
||||
int number_of_frames;
|
||||
int i;
|
||||
bool load_finished;
|
||||
|
||||
|
|
@ -380,7 +381,18 @@ ply_progress_animation_add_frames (ply_progress_animation_t *progress_animation)
|
|||
free (entries[i]);
|
||||
entries[i] = NULL;
|
||||
}
|
||||
load_finished = true;
|
||||
|
||||
number_of_frames = ply_array_get_size (progress_animation->frames);
|
||||
if (number_of_frames == 0)
|
||||
{
|
||||
ply_trace ("could not find any progress animation frames");
|
||||
load_finished = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
ply_trace ("found %d progress animation frames", number_of_frames);
|
||||
load_finished = true;
|
||||
}
|
||||
|
||||
out:
|
||||
if (!load_finished)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue