mirror of
https://github.com/ocornut/imgui.git
synced 2024-11-27 16:29:02 +08:00
Internals, Tabbar: fixed TabBarGetCurrentTab() with tab_idx == 0. (#7629)
Thanks @VerySmallRoach. Amend 3d8885cbb
(#5853, #5997)
This commit is contained in:
parent
1f9fc382c3
commit
7f5d5c80b2
@ -8285,7 +8285,7 @@ ImGuiTabItem* ImGui::TabBarFindTabByOrder(ImGuiTabBar* tab_bar, int order)
|
||||
|
||||
ImGuiTabItem* ImGui::TabBarGetCurrentTab(ImGuiTabBar* tab_bar)
|
||||
{
|
||||
if (tab_bar->LastTabItemIdx <= 0 || tab_bar->LastTabItemIdx >= tab_bar->Tabs.Size)
|
||||
if (tab_bar->LastTabItemIdx < 0 || tab_bar->LastTabItemIdx >= tab_bar->Tabs.Size)
|
||||
return NULL;
|
||||
return &tab_bar->Tabs[tab_bar->LastTabItemIdx];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user