From 50462807446fd62dbacfba90a7afffc1ff70d3b1 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sat, 3 May 2014 12:17:07 +0300 Subject: [PATCH] Fix a bug with attaching ends in ExtendTool This managed to avoid a segfault despite the null pointer dereference, because the first thing Track::link_to does is check if the passed-in reference is a track, and a null pointer isn't. --- source/designer/extendtool.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/designer/extendtool.cpp b/source/designer/extendtool.cpp index 54d3d10..9b6ec9a 100644 --- a/source/designer/extendtool.cpp +++ b/source/designer/extendtool.cpp @@ -84,6 +84,8 @@ void ExtendTool::connect() if(gap<0) continue; + start_track = i->track(); + end_track = j->track(); ok = true; } -- 2.45.2