From d56e2dcca3398ca7a2b391c1af5385a9759119cb Mon Sep 17 00:00:00 2001 From: Jeremy Siek Date: Mon, 9 Jul 2001 14:10:56 +0000 Subject: [PATCH] removed use of color_vec[0] to avoid problems when num_vertices(g) == 0 [SVN r10572] --- include/boost/graph/depth_first_search.hpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/include/boost/graph/depth_first_search.hpp b/include/boost/graph/depth_first_search.hpp index b5eda532..d91dddbe 100644 --- a/include/boost/graph/depth_first_search.hpp +++ b/include/boost/graph/depth_first_search.hpp @@ -138,11 +138,12 @@ namespace boost { detail::error_property_not_found) { std::vector color_vec(num_vertices(g)); + default_color_type c; dfs_impl(g, vis, make_iterator_property_map - (color_vec.begin(), - choose_const_pmap(get_param(params, vertex_index), - g, vertex_index), color_vec[0]) ); + (color_vec.begin(), + choose_const_pmap(get_param(params, vertex_index), + g, vertex_index), c) ); } };