From: Andrea Zagli Date: Sun, 25 Jun 2017 11:03:46 +0000 (+0200) Subject: In FormElementArray setted value in any case. X-Git-Tag: v0.1.0~1^2~4 X-Git-Url: https://saetta.ns0.it/gitweb?a=commitdiff_plain;h=b3cc41ceb2bc6a0a1e4a4226be697bab94bb0275;p=zakform%2Flibzakform In FormElementArray setted value in any case. --- diff --git a/src/formelementarray.c b/src/formelementarray.c index bb976a7..6c9b11f 100644 --- a/src/formelementarray.c +++ b/src/formelementarray.c @@ -411,12 +411,15 @@ zak_form_element_array_set_value (ZakFormElementArray *element, GValue *value) } /* assign value to the right FormElement */ - if (field_name != NULL - && field_value != NULL) + if (field_name != NULL) { form_element = zak_form_element_array_get_element_by_id (ZAK_FORM_ELEMENT (element), field_name); if (form_element != NULL) { + if (field_value == NULL) + { + field_value = zak_utils_gvalue_new_string (""); + } zak_form_element_set_value (ZAK_FORM_ELEMENT (form_element), field_value); } }