diff options
| author | Kaalleen <36401965+kaalleen@users.noreply.github.com> | 2022-07-04 13:13:05 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-04 13:13:05 +0200 |
| commit | 8d9a469ae2c289d2fde46c64d6d6d37e27dc9520 (patch) | |
| tree | b5c9337ff16f90b4fe71f590f33fe6686bf92b40 /lib/extensions/palette_to_text.py | |
| parent | 4c3a11bb8252aaaeb9abbd7f5f26c43e8a495d6b (diff) | |
Ignore invalid palettes (#1718)
Diffstat (limited to 'lib/extensions/palette_to_text.py')
| -rw-r--r-- | lib/extensions/palette_to_text.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/extensions/palette_to_text.py b/lib/extensions/palette_to_text.py index 0944c649..db0c50cf 100644 --- a/lib/extensions/palette_to_text.py +++ b/lib/extensions/palette_to_text.py @@ -27,6 +27,10 @@ class PaletteToText(InkstitchExtension): return thread_palette = ThreadPalette(palette_file) + if not thread_palette.is_gimp_palette: + inkex.errormsg(_("Cannot read palette: invalid GIMP palette header")) + return + current_layer = self.svg.get_current_layer() x = 0 |
