]> granicus.if.org Git - vim/commitdiff
patch 9.0.0927: Coverity warns for using a NULL pointer v9.0.0927
authorBram Moolenaar <Bram@vim.org>
Wed, 23 Nov 2022 11:36:22 +0000 (11:36 +0000)
committerBram Moolenaar <Bram@vim.org>
Wed, 23 Nov 2022 11:36:22 +0000 (11:36 +0000)
Problem:    Coverity warns for using a NULL pointer.
Solution:   Check for memory allocaion failure.

src/version.c
src/window.c

index c9e3a2ef6b42f21d871362c568507c7824fafdc1..6e0d886b028d6b32798f47f3d6783b55ce081425 100644 (file)
@@ -695,6 +695,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    927,
 /**/
     926,
 /**/
index 48eabdab57f2df059d953a1208b7169203169fa3..6816697de39411115a684f956f29d967381ce507 100644 (file)
@@ -3134,7 +3134,7 @@ may_trigger_win_scrolled_resized(void)
 #endif
     }
 
-    if (trigger_scroll)
+    if (trigger_scroll && scroll_dict != NULL)
     {
 #ifdef FEAT_EVAL
        save_v_event_T  save_v_event;