patch 9.0.0927: Coverity warns for using a NULL pointer

Problem:    Coverity warns for using a NULL pointer.
Solution:   Check for memory allocaion failure.
diff --git a/src/window.c b/src/window.c
index 48eabda..6816697 100644
--- a/src/window.c
+++ b/src/window.c
@@ -3134,7 +3134,7 @@
 #endif
     }
 
-    if (trigger_scroll)
+    if (trigger_scroll && scroll_dict != NULL)
     {
 #ifdef FEAT_EVAL
 	save_v_event_T  save_v_event;