Commit cbdb11e1 cbdb11e15c5c46c7e68602fde5de16bcd6ed4842 by Sergey Poznyakoff

Fix some special cases of using mu_app_init.

* libmu_argp/muinit.c (mu_app_init): Allow capa==NULL.
* mailbox/cfg_driver.c (mu_config_clone_container): Do nothing
if cont == NULL.
1 parent fd5b5599
...@@ -68,6 +68,7 @@ mu_app_init (struct argp *myargp, const char **capa, ...@@ -68,6 +68,7 @@ mu_app_init (struct argp *myargp, const char **capa,
68 68
69 mu_set_program_name (argv[0]); 69 mu_set_program_name (argv[0]);
70 mu_libargp_init (); 70 mu_libargp_init ();
71 if (capa)
71 for (i = 0; capa[i]; i++) 72 for (i = 0; capa[i]; i++)
72 mu_gocs_register_std (capa[i]); /*FIXME*/ 73 mu_gocs_register_std (capa[i]); /*FIXME*/
73 if (!myargp) 74 if (!myargp)
......
...@@ -320,6 +320,8 @@ _clone_action (void *item, void *cbdata) ...@@ -320,6 +320,8 @@ _clone_action (void *item, void *cbdata)
320 int 320 int
321 mu_config_clone_container (struct mu_cfg_cont *cont) 321 mu_config_clone_container (struct mu_cfg_cont *cont)
322 { 322 {
323 if (!cont)
324 return 0;
323 mu_refcount_inc (cont->refcount); 325 mu_refcount_inc (cont->refcount);
324 /* printf("clone %p-%s: %d\n", cont, cont->v.section.ident, n); */ 326 /* printf("clone %p-%s: %d\n", cont, cont->v.section.ident, n); */
325 switch (cont->type) 327 switch (cont->type)
......