[libcalamaresui] Fix isAtVeryEnd()
- With an empty list, the question is meaningless - .. and we called this with an empty list while constructing the ViewManager; if quit-at-end is true, then this would terminate Calamares immediately because the list was at the end.
This commit is contained in:
parent
081f5ec4d9
commit
10dd32edd2
@ -272,8 +272,13 @@ stepIsExecute( const ViewStepList& steps, int index )
|
|||||||
|
|
||||||
static inline bool
|
static inline bool
|
||||||
isAtVeryEnd( const ViewStepList& steps, int index )
|
isAtVeryEnd( const ViewStepList& steps, int index )
|
||||||
|
|
||||||
{
|
{
|
||||||
|
// If we have an empty list, then there's no point right now
|
||||||
|
// in checking if we're at the end.
|
||||||
|
if ( steps.count() == 0 )
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
return ( index >= steps.count() ) || ( index == steps.count() - 1 && steps.last()->isAtEnd() );
|
return ( index >= steps.count() ) || ( index == steps.count() - 1 && steps.last()->isAtEnd() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user