diff --git a/imgui_widgets.cpp b/imgui_widgets.cpp index 042af86..ca84674 100644 --- a/imgui_widgets.cpp +++ b/imgui_widgets.cpp @@ -1366,7 +1366,7 @@ { if (count == 1) { - items[0].Width -= width_excess; + items[0].Width = ImMax(items[0].Width - width_excess, 1.0f); return; } ImQsort(items, (size_t)count, sizeof(ImGuiShrinkWidthItem), ShrinkWidthItemComparer); @@ -6562,6 +6562,7 @@ { ImGuiTabItem* tab = &tab_bar->Tabs[tab_n]; tab->Width = ImMin(tab->WidthContents, tab_max_width); + IM_ASSERT(tab->Width > 0.0f); } }