lc = 0;
line = slide->line;
- while(line) {
+ while(line && line->text) {
- if (line && line->text && line->text->text)
+ if (line->text->text)
lc += url_count_inline(line->text->text);
- if (line && line->text && line->text->text)
+ if (line->text->text)
line->length -= url_len_inline(line->text->text);
if(line->length > COLS) {
url_purge();
}
+ // disable ncurses
endwin();
+ // free ncurses memory
+ delwin(content);
+ delwin(stdscr);
+
return 0;
}