AmendHub

Download:

jcs

/

amend

/

amendments

/

73

committer: Clear browser's associated committer on close, SetPort too


jcs made amendment 73 over 2 years ago
--- browser.c Thu Feb 3 17:36:42 2022 +++ browser.c Wed Jun 15 09:04:03 2022 @@ -204,10 +204,8 @@ browser_close(struct browser *browser) void browser_close_committer(struct browser *browser) { - if (browser->committer) { + if (browser->committer) committer_close(browser->committer); - browser->committer = NULL; - } SetPort(browser->win); } --- committer.c Mon Jun 6 22:50:22 2022 +++ committer.c Tue Jun 14 22:16:33 2022 @@ -142,15 +142,15 @@ committer_init(struct browser *browser) ShowWindow(committer->win); committer_last_te = committer->log_te; - committer_update_menu(committer); - DrawMenuBar(); - committer_update(committer, NULL); + DrawMenuBar(); } void committer_close(struct committer *committer) { + committer->browser->committer = NULL; + if (committer->diff_line != NULL) { DisposHandle(committer->diff_line); committer->diff_line = NULL; @@ -162,7 +162,8 @@ committer_close(struct committer *committer) TEDispose(committer->log_te); TEDispose(committer->diff_te); DisposeWindow(committer->win); - + SetPort(committer->browser->win); + free(committer); committer_last_te = NULL;