# # # patch "roster.cc" # from [f9c0435d02830957c3c994aedfe9346bd21998bd] # to [c43672f75a5b86fc334bf008b9a99db6db8bbfbf] # ============================================================ --- roster.cc f9c0435d02830957c3c994aedfe9346bd21998bd +++ roster.cc c43672f75a5b86fc334bf008b9a99db6db8bbfbf @@ -2178,18 +2178,22 @@ editable_roster_for_check::editable_rost : editable_roster_base(r, nis), problems(0) { node_map nodes = r.all_nodes(); - node_map::const_iterator i = nodes.begin(); - node_id max = i->first; - for (; i != nodes.end(); ++i) + if (!nodes.empty()) { - if (i->first > max) - max = i->first; - } + node_map::const_iterator i = nodes.begin(); + node_id max = i->first; - // ensure our node source starts beyond the max temp node in this roster - while (nis.next() <= max) - ; + for (; i != nodes.end(); ++i) + { + if (i->first > max) + max = i->first; + } + + // ensure our node source starts beyond the max temp node in this roster + while (nis.next() <= max) + ; + } } node_id