From 82983c134ca3f8ce229a2f1a52dedd6a71abe990 Mon Sep 17 00:00:00 2001 From: ATATC Date: Sun, 14 Jul 2024 21:27:32 +0800 Subject: [PATCH] Bug fixed: unhandled None values. (#279) --- leads_gui/photo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/leads_gui/photo.py b/leads_gui/photo.py index cddd882f..c3a2a141 100644 --- a/leads_gui/photo.py +++ b/leads_gui/photo.py @@ -24,7 +24,7 @@ def __init__(self, command: _Callable[[_Event], None] = lambda _: None) -> None: CanvasBased.__init__(self, master, theme_key, width, height, fg_color, hover_color, bg_color, corner_radius, clickable, command) - VariableControlled.__init__(self, variable) + VariableControlled.__init__(self, variable if variable else _StringVar(master)) self.attach(self.partially_render) self._image: _PhotoImage | None = None