Mercurial > vim
comparison src/main.c @ 28429:aa9720c76412 v8.2.4739
patch 8.2.4739: accessing freed memory after WinScrolled autocmd event
Commit: https://github.com/vim/vim/commit/d58862d18f091d3c14fa3647e724ef7eea1ecefa
Author: zeertzjq <zeertzjq@outlook.com>
Date: Tue Apr 12 11:32:48 2022 +0100
patch 8.2.4739: accessing freed memory after WinScrolled autocmd event
Problem: Accessing freed memory after WinScrolled autocmd event.
Solution: Check the window pointer is still valid. (closes https://github.com/vim/vim/issues/10156)
Remove the argument from may_trigger_winscrolled().
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 12 Apr 2022 12:45:04 +0200 |
parents | e466fdbe0699 |
children | 0533e7466ef0 |
comparison
equal
deleted
inserted
replaced
28428:eb08141a60cb | 28429:aa9720c76412 |
---|---|
1340 // before triggering a WinScrolled autocommand. | 1340 // before triggering a WinScrolled autocommand. |
1341 update_topline(); | 1341 update_topline(); |
1342 validate_cursor(); | 1342 validate_cursor(); |
1343 | 1343 |
1344 if (!finish_op) | 1344 if (!finish_op) |
1345 may_trigger_winscrolled(curwin); | 1345 may_trigger_winscrolled(); |
1346 | 1346 |
1347 // If nothing is pending and we are going to wait for the user to | 1347 // If nothing is pending and we are going to wait for the user to |
1348 // type a character, trigger SafeState. | 1348 // type a character, trigger SafeState. |
1349 may_trigger_safestate(!op_pending() && restart_edit == 0); | 1349 may_trigger_safestate(!op_pending() && restart_edit == 0); |
1350 | 1350 |