From 37d37cc86a3915f1e6536a2f8ed082d20ac989d9 Mon Sep 17 00:00:00 2001 From: William Silversmith Date: Sat, 22 Jun 2024 03:16:59 -0400 Subject: [PATCH] fix: removed labels will not always have an assigned fill count --- fastmorph/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fastmorph/__init__.py b/fastmorph/__init__.py index 41193ab..b9196bc 100644 --- a/fastmorph/__init__.py +++ b/fastmorph/__init__.py @@ -271,7 +271,7 @@ def fill_holes( if return_fill_count: for label in removed_set: - del fill_counts[label] + fill_counts.pop(label, None) ret.append(fill_counts) if return_removed: