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-codehist_backfill_fixes
parent
48493e50b0
commit
2d678e1582
|
|
@ -169,7 +169,10 @@ class ArrowEditor(Struct):
|
||||||
f'{arrow!r}\n'
|
f'{arrow!r}\n'
|
||||||
)
|
)
|
||||||
for linked in self.godw.iter_linked():
|
for linked in self.godw.iter_linked():
|
||||||
linked.chart.plotItem.removeItem(arrow)
|
if not (chart := linked.chart):
|
||||||
|
continue
|
||||||
|
|
||||||
|
chart.plotItem.removeItem(arrow)
|
||||||
try:
|
try:
|
||||||
arrows.remove(arrow)
|
arrows.remove(arrow)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue