Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d168e59

Browse files
committed
FIX: protect against None child
1 parent 4cc9a74 commit d168e59

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/matplotlib/offsetbox.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1053,7 +1053,8 @@ def __init__(self, loc,
10531053
def set_child(self, child):
10541054
"set the child to be anchored"
10551055
self._child = child
1056-
child.axes = self.axes
1056+
if child is not None:
1057+
child.axes = self.axes
10571058
self.stale = True
10581059

10591060
def get_child(self):

0 commit comments

Comments
 (0)