From 05d344828f919fad7846d2d76534eb02b554dc00 Mon Sep 17 00:00:00 2001 From: Jabier Arraiza Cenoz Date: Sat, 5 Nov 2016 03:32:30 +0100 Subject: Fix bug:1639083 crach closing segment with shortcut LPE Fixed bugs: - https://launchpad.net/bugs/1639083 (bzr r15210) --- src/ui/tools/pencil-tool.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ui/tools/pencil-tool.cpp') diff --git a/src/ui/tools/pencil-tool.cpp b/src/ui/tools/pencil-tool.cpp index 54106437c..ec2874823 100644 --- a/src/ui/tools/pencil-tool.cpp +++ b/src/ui/tools/pencil-tool.cpp @@ -588,8 +588,8 @@ void PencilTool::_setEndpoint(Geom::Point const &p) { * Still not sure, how it will make most sense. */ void PencilTool::_finishEndpoint() { - if ( ( this->red_curve->is_empty() ) - || ( *(this->red_curve->first_point()) == *(this->red_curve->second_point()) ) ) + if (this->red_curve->is_unset() || + this->red_curve->first_point() == this->red_curve->second_point()) { this->red_curve->reset(); sp_canvas_bpath_set_bpath(SP_CANVAS_BPATH(this->red_bpath), NULL); -- cgit v1.2.3