summaryrefslogtreecommitdiff
path: root/render/box_construct.c
diff options
context:
space:
mode:
Diffstat (limited to 'render/box_construct.c')
-rw-r--r--render/box_construct.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/render/box_construct.c b/render/box_construct.c
index cf39901df..7bc8b2152 100644
--- a/render/box_construct.c
+++ b/render/box_construct.c
@@ -307,10 +307,6 @@ bool box_construct_element(xmlNode *n, struct content *content,
style = box_get_style(content, parent_style, n);
if (!style)
return false;
- if (style->display == CSS_DISPLAY_NONE) {
- talloc_free(style);
- return true;
- }
/* extract title attribute, if present */
if ((title0 = xmlGetProp(n, (const xmlChar *) "title"))) {
@@ -348,7 +344,11 @@ bool box_construct_element(xmlNode *n, struct content *content,
}
if (style->display == CSS_DISPLAY_NONE) {
talloc_free(style);
- box_free_box(box);
+ /* We can't do this, as it will destroy any gadget
+ * associated with the box, thus making any form usage
+ * access freed memory. The box is in the talloc context,
+ * anyway, so will get cleaned up with the content. */
+ /* box_free_box(box); */
return true;
}