Because IupDestroy will also remove the dialog from that list and list->next will be invalid.
Best, Scuri Em qui., 28 de mai. de 2020 às 18:55, Ranier Vilela <ranier_...@hotmail.com> escreveu: > Hi Scuri, > > Is there a special condition, so that the function below is not written > like this? > > usr\iup_dlglist.c: > void iupDlgListDestroyAll(void) > { > Idiallst *list; > for (list = idlglist; list; list = list->next) > { > if (iupObjectCheck(list->ih)) > { > IupDestroy(list->ih); /* this will also destroy the list */ > list->ih = NULL; > } > } > } > > regards, > Ranier Vilela > > _______________________________________________ > Iup-users mailing list > Iup-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/iup-users >
_______________________________________________ Iup-users mailing list Iup-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/iup-users