From 4f7fe42548e3f91dffc8df220c04f16911497346 Mon Sep 17 00:00:00 2001 From: MenTaLguY Date: Sun, 4 Mar 2007 02:08:21 +0000 Subject: make conversions away from NR::Maybe explicit (bzr r2530) --- src/nodepath.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/nodepath.cpp') diff --git a/src/nodepath.cpp b/src/nodepath.cpp index 78d76404d..1d854418b 100644 --- a/src/nodepath.cpp +++ b/src/nodepath.cpp @@ -1549,7 +1549,11 @@ sp_nodepath_select_segment_near_point(Inkscape::NodePath::Path *nodepath, NR::Po } sp_nodepath_ensure_livarot_path(nodepath); - Path::cut_position position = get_nearest_position_on_Path(nodepath->livarot_path, p); + NR::Maybe maybe_position = get_nearest_position_on_Path(nodepath->livarot_path, p); + if (!maybe_position) { + return; + } + Path::cut_position position = *maybe_position; //find segment to segment Inkscape::NodePath::Node *e = sp_nodepath_get_node_by_index(position.piece); @@ -1581,7 +1585,11 @@ sp_nodepath_add_node_near_point(Inkscape::NodePath::Path *nodepath, NR::Point p) } sp_nodepath_ensure_livarot_path(nodepath); - Path::cut_position position = get_nearest_position_on_Path(nodepath->livarot_path, p); + NR::Maybe maybe_position = get_nearest_position_on_Path(nodepath->livarot_path, p); + if (!maybe_position) { + return; + } + Path::cut_position position = *maybe_position; //find segment to split Inkscape::NodePath::Node *e = sp_nodepath_get_node_by_index(position.piece); -- cgit v1.2.3