mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 05:27:45 +00:00
LibGUI+Browser: Fix crash when activating a "Tab n" action
Previously we would try setting the tab index regardless if that tab actually existed, resulting in Browser crashing by either pressing Control + N or using the CommandPalette.
This commit is contained in:
parent
971d6ce16f
commit
52ee5026ea
2 changed files with 4 additions and 1 deletions
|
@ -29,6 +29,7 @@ public:
|
|||
bool has_vertical_tabs() const { return m_tab_position == TabPosition::Left || m_tab_position == TabPosition::Right; }
|
||||
|
||||
Optional<size_t> active_tab_index() const;
|
||||
size_t tab_count() { return m_tabs.size(); }
|
||||
|
||||
Widget* active_widget() { return m_active_widget.ptr(); }
|
||||
Widget const* active_widget() const { return m_active_widget.ptr(); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue