0
0
mirror of https://github.com/vim/vim.git synced 2025-09-29 04:34:16 -04:00

patch 9.0.0682: crash when popup with deleted timer is closed

Problem:    Crash when popup with deleted timer is closed. (Igbanam
            Ogbuluijah)
Solution:   Check the timer still exists. (closes #11301)
This commit is contained in:
Bram Moolenaar
2022-10-07 11:20:29 +01:00
parent 0937b9fb24
commit cf3d0eaf47
5 changed files with 34 additions and 4 deletions

View File

@@ -5322,7 +5322,8 @@ win_free_popup(win_T *win)
close_buffer(win, win->w_buffer, 0, FALSE, FALSE);
}
# if defined(FEAT_TIMERS)
if (win->w_popup_timer != NULL)
// the timer may have been cleared, making the pointer invalid
if (timer_valid(win->w_popup_timer))
stop_timer(win->w_popup_timer);
# endif
vim_free(win->w_frame);