Skip to content

Commit 88ae15c

Browse files
ailintomsam-m888
authored andcommitted
[GraphView]only check image_path when self.show_images=true[gramps51] (#227)
To avoid crashing with the referenced before assignment error (alternative: `add image_path = None` before `if self.show_images:`)
1 parent 7c73692 commit 88ae15c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

GraphView/graphview.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2359,8 +2359,8 @@ def get_person_label(self, person):
23592359
if self.show_images:
23602360
image_path = self.view.graph_widget.get_person_image(person,
23612361
kind='path')
2362-
if image_path:
2363-
label += ('<TR><TD><IMG SRC="%s"/></TD></TR>' % image_path)
2362+
if image_path:
2363+
label += ('<TR><TD><IMG SRC="%s"/></TD></TR>' % image_path)
23642364

23652365

23662366
# start adding person name and dates

0 commit comments

Comments
 (0)