To: vim_dev@googlegroups.com Subject: Patch 8.2.0678 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.0678 Problem: Rare crash for popup menu. Solution: Check for NULL pointer. (Nobuhiro Takasaki, closes #6027) Files: src/popupmenu.c *** ../vim-8.2.0677/src/popupmenu.c 2020-04-12 19:37:13.522297249 +0200 --- src/popupmenu.c 2020-05-02 14:48:08.285837017 +0200 *************** *** 60,68 **** pum_extra_width = 0; for (i = 0; i < pum_size; ++i) { ! w = vim_strsize(pum_array[i].pum_text); ! if (pum_base_width < w) ! pum_base_width = w; if (pum_array[i].pum_kind != NULL) { w = vim_strsize(pum_array[i].pum_kind) + 1; --- 60,71 ---- pum_extra_width = 0; for (i = 0; i < pum_size; ++i) { ! if (pum_array[i].pum_text != NULL) ! { ! w = vim_strsize(pum_array[i].pum_text); ! if (pum_base_width < w) ! pum_base_width = w; ! } if (pum_array[i].pum_kind != NULL) { w = vim_strsize(pum_array[i].pum_kind) + 1; *** ../vim-8.2.0677/src/version.c 2020-05-01 19:29:05.006157706 +0200 --- src/version.c 2020-05-01 21:08:16.726501432 +0200 *************** *** 748,749 **** --- 748,751 ---- { /* Add new patch number below this line */ + /**/ + 678, /**/ -- On the other hand, you have different fingers. -- Steven Wright /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///