summaryrefslogtreecommitdiffstats
path: root/src/nodepath.cpp
diff options
context:
space:
mode:
authorMenTaLguY <mental@rydia.net>2007-03-04 02:08:21 +0000
committermental <mental@users.sourceforge.net>2007-03-04 02:08:21 +0000
commit4f7fe42548e3f91dffc8df220c04f16911497346 (patch)
treee72476964c14896870222829d38e55f387ed3995 /src/nodepath.cpp
parentremove debug messages that sneaked in (diff)
downloadinkscape-4f7fe42548e3f91dffc8df220c04f16911497346.tar.gz
inkscape-4f7fe42548e3f91dffc8df220c04f16911497346.zip
make conversions away from NR::Maybe explicit
(bzr r2530)
Diffstat (limited to 'src/nodepath.cpp')
-rw-r--r--src/nodepath.cpp12
1 files changed, 10 insertions, 2 deletions
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<Path::cut_position> 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<Path::cut_position> 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);