]> git.tdb.fi Git - r2c2.git/commitdiff
Fix a bug with attaching ends in ExtendTool
authorMikko Rasa <tdb@tdb.fi>
Sat, 3 May 2014 09:17:07 +0000 (12:17 +0300)
committerMikko Rasa <tdb@tdb.fi>
Sat, 3 May 2014 10:35:27 +0000 (13:35 +0300)
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

index 54d3d10b8081dca2610f5f418470c6f0504f64e7..9b6ec9ab606474bd5c1facfdd9d2b623fb86d80c 100644 (file)
@@ -84,6 +84,8 @@ void ExtendTool::connect()
                        if(gap<0)
                                continue;
 
+                       start_track = i->track();
+                       end_track = j->track();
                        ok = true;
                }