Guard against `None` chart in `ArrowEditor.remove()`

Add null check for `linked.chart` before calling
`.plotItem.removeItem()` to prevent `AttributeError` when chart
is `None`.

(this commit msg was generated in some part by [`claude-code`][claude-code-gh])
[claude-code-gh]: https://github.com/anthropics/claude-code
hist_backfill_fixes
Gud Boi 2026-01-30 19:21:28 -05:00
parent 48493e50b0
commit 2d678e1582
1 changed files with 4 additions and 1 deletions

View File

@ -169,7 +169,10 @@ class ArrowEditor(Struct):
f'{arrow!r}\n'
)
for linked in self.godw.iter_linked():
linked.chart.plotItem.removeItem(arrow)
if not (chart := linked.chart):
continue
chart.plotItem.removeItem(arrow)
try:
arrows.remove(arrow)
except ValueError: