LibGUI: Allow a wizard page to return null as its next page

This commit is contained in:
AnotherTest 2021-03-19 17:23:10 +03:30 committed by Andreas Kling
parent b072cb725f
commit 714ce4741d
Notes: sideshowbarker 2024-07-18 21:10:30 +09:00

View file

@ -79,7 +79,11 @@ WizardDialog::WizardDialog(Window* parent_window)
if (!current_page().can_go_next())
return done(ExecOK);
push_page(*current_page().next_page());
auto next_page = current_page().next_page();
if (!next_page)
return done(ExecOK);
push_page(*next_page);
};
auto& button_spacer = nav_container_widget.add<Widget>();