]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 8.2.3837: QNX: crash when compiled with GUI but using terminal v8.2.3837
authorBram Moolenaar <Bram@vim.org>
Fri, 17 Dec 2021 16:00:04 +0000 (16:00 +0000)
committerBram Moolenaar <Bram@vim.org>
Fri, 17 Dec 2021 16:00:04 +0000 (16:00 +0000)
Problem:    QNX: crash when compiled with GUI but using terminal.
Solution:   Check gui.in_use is set. (Hirohito Higashi, closes #9363)

src/autocmd.c
src/version.c

index 305679cf329ea402097ad8f1bdd1fd7fb62927d9..789dde1a207b932ac42e6701398d7c12a90c4c25 100644 (file)
@@ -1613,10 +1613,15 @@ win_found:
 #endif
        }
 #if defined(FEAT_GUI)
-       // Hide the scrollbars from the aucmd_win and update.
-       gui_mch_enable_scrollbar(&aucmd_win->w_scrollbars[SBAR_LEFT], FALSE);
-       gui_mch_enable_scrollbar(&aucmd_win->w_scrollbars[SBAR_RIGHT], FALSE);
-       gui_may_update_scrollbars();
+       if (gui.in_use)
+       {
+           // Hide the scrollbars from the aucmd_win and update.
+           gui_mch_enable_scrollbar(
+                                  &aucmd_win->w_scrollbars[SBAR_LEFT], FALSE);
+           gui_mch_enable_scrollbar(
+                                 &aucmd_win->w_scrollbars[SBAR_RIGHT], FALSE);
+           gui_may_update_scrollbars();
+       }
 #endif
     }
     else
index 22f97ea212edc91787f5997cb80bb9e07bb1ca1a..aafa3d81def88a4f4f8c30410a1d933d4afca63d 100644 (file)
@@ -749,6 +749,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    3837,
 /**/
     3836,
 /**/