Commit 48b5ea9
v2: nil-guard Application.Quit so pre-Run shutdown doesn't panic (#5468)
a.application is only set inside Run() once app.CreateApp succeeds.
Calling Quit() before Run() (or after Run() failed early at CreateApp)
hits a nil receiver inside the inner closure and crashes the host
process. Fix from the issue: guard the Shutdown() call.
Closes #5452
Signed-off-by: Charlie Tonneslan <cst0520@gmail.com>
Co-authored-by: Lea Anthony <lea.anthony@gmail.com>1 parent 42e853d commit 48b5ea9
2 files changed
Lines changed: 12 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
78 | 82 | | |
79 | 83 | | |
80 | | - | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
81 | 87 | | |
82 | 88 | | |
83 | 89 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
17 | 21 | | |
18 | 22 | | |
19 | 23 | | |
| |||
0 commit comments