From: Mikko Rasa Date: Sat, 3 May 2014 09:17:07 +0000 (+0300) Subject: Fix a bug with attaching ends in ExtendTool X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=50462807446fd62dbacfba90a7afffc1ff70d3b1;p=r2c2.git 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. --- 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; }