AmendHub

Download:

jcs

/

wikipedia

/

amendments

/

37

browser: Only xfree links if there are any


jcs made amendment 37 over 2 years ago
--- browser.c Wed Sep 7 13:41:26 2022 +++ browser.c Fri Sep 9 13:42:03 2022 @@ -865,8 +865,9 @@ browser_clear(struct browser *browser) for (n = 0; n < browser->links_count; n++) xfree(&browser->links[n].link); - - xfree(&browser->links); + + if (browser->links != NULL) + xfree(&browser->links); browser->links_count = 0; browser->links_size = 0; @@ -874,7 +875,8 @@ browser_clear(struct browser *browser) TESetText("", 0, browser->te); TESetText("", 0, browser->debug_te); - SetCtlValue(browser->te_scroller, GetCtlMin(browser->te_scroller)); + UpdateScrollbarForTE(browser->win, browser->te_scroller, + browser->te, true); } void