AmendHub

Download (as of this amendment):

jcs

/

amend

/

amendments

/

168

committer+editor: Test for proper window variable


jcs made amendment 168 24 days ago
--- committer.c Sun Sep 27 16:43:24 2026 +++ committer.c Mon Sep 28 13:52:39 2026 @@ -84,7 +84,7 @@ committer_init(struct browser *browser) committer->win = NewWindow(0L, &bounds, CtoPstr(title), false, noGrowDocProc, (WindowPtr)-1L, true, 0); - if (!committer) + if (!committer->win) panic("Can't create committer window"); SetPort(committer->win); --- editor.c Mon Sep 28 13:39:08 2026 +++ editor.c Mon Sep 28 13:52:59 2026 @@ -76,7 +76,7 @@ editor_init(struct browser *browser, struct repo_amend editor->win = NewWindow(0L, &bounds, CtoPstr(title), false, noGrowDocProc, (WindowPtr)-1L, true, 0); - if (!editor) + if (!editor->win) panic("Can't create editor window"); SetPort(editor->win);