diff --git a/gtk2_ardour/utils.cc b/gtk2_ardour/utils.cc index 747c9f134b..6bc56f0887 100644 --- a/gtk2_ardour/utils.cc +++ b/gtk2_ardour/utils.cc @@ -719,14 +719,16 @@ ARDOUR_UI_UTILS::round_robin_palette_color (bool just_peek) std::vector c (gc); static std::vector::size_type index = 0; - if(just_peek) { - return c[index]; - } + assert (c.size() > 0); if (index >= c.size ()) { index = 0; } + if(just_peek) { + return c[index]; + } + return c[index++]; }