- case VIK_LAYER_PARAM_STRING:
- vlm_append(d.s, strlen(d.s));
- break;
-
+ case VIK_LAYER_PARAM_STRING:
+ // Remember need braces as these are macro calls, not single statement functions!
+ if ( d.s ) {
+ vlm_append(d.s, strlen(d.s));
+ }
+ else {
+ // Need to insert empty string otherwise the unmarshall will get confused
+ vlm_append("", 0);
+ }
+ break;