Skip to content

Commit 2dcc0bb

Browse files
committed
Don't crash when running global detectors on a subset of time-points.
1 parent 47c62df commit 2dcc0bb

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/main/java/fiji/plugin/trackmate/TrackMate.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,11 @@ private boolean processGlobal( final SpotGlobalDetectorFactory factory, final Im
414414
for ( int frame = settings.tstart; frame <= settings.tend; frame++ )
415415
{
416416
final List< Spot > spotsThisFrame = new ArrayList<>();
417-
for ( final Spot spot : rawSpots.iterable( frame, false ) )
417+
final Iterable< Spot > spotsIt = rawSpots.iterable( frame, false );
418+
if ( spotsIt == null )
419+
continue;
420+
421+
for ( final Spot spot : spotsIt )
418422
{
419423
if ( settings.roi.contains(
420424
( int ) Math.round( spot.getFeature( Spot.POSITION_X ) / calibration[ 0 ] ),

0 commit comments

Comments
 (0)