When parsing a template node, if there is no recognized frame node (e.g.
Label-rectangle), a default full-page frame with a 1x1 layout is created.
This prevents potential crashes if sharing a user '.glabels' directory
with future versions of glabels with new frame types, or in the case of
typos for hand generated templates.
g_free (description);
g_free (paper_id);
+ /*
+ * Create a default full-page frame, if a known frame type was not found.
+ */
+ if ( template->frames == NULL )
+ {
+ lglTemplateFrame *frame;
+
+ frame = lgl_template_frame_rect_new ("0", page_width, page_height, 0, 0, 0);
+ lgl_template_frame_add_layout (frame, lgl_template_layout_new (1, 1, 0, 0, 0, 0));
+ lgl_template_add_frame (template, frame);
+ }
+
return template;
}