if (!t) return;
tl = t->paras;
- ti = tl->items;
- for (i = 0; i < t->nparas; i++) {
- for (j = 0; j < tl->nitems; j++) {
- if (ti->str) free (ti->str);
- if (ti->xshow) free (ti->xshow);
- if (ti->font) free_html_font(ti->font);
- if (ti->layout && ti->free_layout) ti->free_layout (ti->layout);
- ti++;
- }
- tl++;
+ if (tl) {
ti = tl->items;
+ for (i = 0; i < t->nparas; i++) {
+ for (j = 0; j < tl->nitems; j++) {
+ if (ti->str) free (ti->str);
+ if (ti->xshow) free (ti->xshow);
+ if (ti->font) free_html_font(ti->font);
+ if (ti->layout && ti->free_layout) ti->free_layout (ti->layout);
+ ti++;
+ }
+ tl++;
+ ti = tl->items;
+ }
+ if (ti != tl->items) free(tl->items);
+ if (tl != t->paras) free(t->paras);
}
- if (ti != tl->items)
- free(tl->items);
- if (tl != t->paras)
- free(t->paras);
free(t);
}