summaryrefslogtreecommitdiff
path: root/render/form.c
diff options
context:
space:
mode:
Diffstat (limited to 'render/form.c')
-rw-r--r--render/form.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/render/form.c b/render/form.c
index 0c0eef2cb..46d5b28f6 100644
--- a/render/form.c
+++ b/render/form.c
@@ -212,6 +212,10 @@ struct form_control *form_new_control(void *node, form_control_type type)
*/
void form_add_control(struct form *form, struct form_control *control)
{
+ if (form == NULL) {
+ return;
+ }
+
control->form = form;
if (form->controls != NULL) {