Commit 2c7ed74
fix crash in ClearTocBox due to re-entrant EN_CHANGE from SetText
Setting tocFilterEdit text to "" triggers EN_CHANGE synchronously,
which re-enters ApplyTocFilter while tocLoaded is still true,
causing access to freed TOC data. Move tocLoaded=false before SetText.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent d29ec7b commit 2c7ed74
1 file changed
+5
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
235 | 235 | | |
236 | 236 | | |
237 | 237 | | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
238 | 243 | | |
239 | 244 | | |
240 | 245 | | |
| |||
245 | 250 | | |
246 | 251 | | |
247 | 252 | | |
248 | | - | |
249 | 253 | | |
250 | 254 | | |
251 | 255 | | |
| |||
0 commit comments