summaryrefslogtreecommitdiff
path: root/lib/extensions
diff options
context:
space:
mode:
Diffstat (limited to 'lib/extensions')
-rw-r--r--lib/extensions/palette_to_text.py4
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