summaryrefslogtreecommitdiff
path: root/lib/gui
diff options
context:
space:
mode:
authorKaalleen <36401965+kaalleen@users.noreply.github.com>2025-04-17 09:14:39 +0200
committerGitHub <noreply@github.com>2025-04-17 09:14:39 +0200
commitad04039c3c9e758f741c9dcc984b7f503b53e6ac (patch)
treece51fdacac2e6b71e9dde52c6e63e68fba1526df /lib/gui
parent8d66330b232b43e7658ffd0a82c7f1388bf9bbc0 (diff)
do not fail on None in edit json (#3676)
Diffstat (limited to 'lib/gui')
-rw-r--r--lib/gui/edit_json/main_panel.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/gui/edit_json/main_panel.py b/lib/gui/edit_json/main_panel.py
index fd0d08d9..6fc82bf0 100644
--- a/lib/gui/edit_json/main_panel.py
+++ b/lib/gui/edit_json/main_panel.py
@@ -220,7 +220,11 @@ class LetteringEditJsonPanel(wx.Panel):
if glyph_list.IsItemChecked(selection):
self.horiz_adv_x[glyph] = self.font_meta['horiz_adv_x_default']
return glyph
- horiz_adv_x = float(glyph_list.GetItem(selection, 2).Text)
+ horiz_adv_x = None
+ try:
+ horiz_adv_x = float(glyph_list.GetItem(selection, 2).Text)
+ except (ValueError, IndexError):
+ pass
if glyph_list.GetItem(selection, 3).Text:
try:
horiz_adv_x = float(glyph_list.GetItem(selection, 3).Text)