}
if (ns->alias_for != NULL) {
- namespaces = array_get(&ns->user_set->namespaces, &count);
+ if (array_is_created(&ns->user_set->namespaces)) {
+ namespaces = array_get(&ns->user_set->namespaces,
+ &count);
+ } else {
+ namespaces = NULL;
+ count = 0;
+ }
for (i = 0; i < count; i++) {
if (strcmp(namespaces[i]->prefix, ns->alias_for) == 0)
break;
/* check that we have at least one service. the actual service
structure validity is checked later while creating them. */
- services = array_get(&set->services, &count);
- if (count == 0) {
+ if (!array_is_created(&set->services) ||
+ array_count(&set->services) == 0) {
*error_r = "No services defined";
return FALSE;
}
+ services = array_get(&set->services, &count);
for (i = 0; i < count; i++) {
if (*services[i]->name == '\0') {
*error_r = t_strdup_printf(