diff --git a/fixtracks/widgets/skeleton.py b/fixtracks/widgets/skeleton.py index be360dc..406fde8 100644 --- a/fixtracks/widgets/skeleton.py +++ b/fixtracks/widgets/skeleton.py @@ -165,6 +165,8 @@ class SkeletonWidget(QWidget): frames:np.ndarray, tracks:np.ndarray, brush:QBrush): num_detections = 0 if coordinates is None else coordinates.shape[0] logging.debug("SkeletonWidget: add %i Skeletons", num_detections) + if num_detections < 1: + return sorting = np.argsort(frames) coordinates = coordinates[sorting,:, :] detection_ids = detection_ids[sorting]