summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/perl/ui/Themes.xs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/perl/ui/Themes.xs b/src/perl/ui/Themes.xs
index 99f1fc78..568a8f54 100644
--- a/src/perl/ui/Themes.xs
+++ b/src/perl/ui/Themes.xs
@@ -6,11 +6,16 @@ void printformat_perl(TEXT_DEST_REC *dest, char *format, char **arglist)
char *module, *str;
int formatnum;
+ formatnum = format_find_tag(module, format);
+ if (formatnum < 0) {
+ die("printformat(): unregistered format '%s'", format);
+ return;
+ }
+
module = g_strdup(perl_get_package());
theme = dest->window->theme == NULL ? current_theme :
dest->window->theme;
- formatnum = format_find_tag(module, format);
signal_emit("print format", 5, theme, module,
&dest, GINT_TO_POINTER(formatnum), arglist);