patch 9.2.0655: GTK4: missing NULL checks in vim_form_measure()

Commit: 
https://github.com/vim/vim/commit/b528ddcfe0dd60b4c42e0b08f4ace0ae3da5e9fb
Author: Foxe Chen <[email protected]>
Date:   Tue Jun 16 19:08:10 2026 +0000

    patch 9.2.0655: GTK4: missing NULL checks in vim_form_measure()
    
    Problem:  GTK4: missing NULL checks in vim_form_measure()
    Solution: Add NULL tests (Foxe Chen)
    
    closes: #20536
    
    Signed-off-by: Foxe Chen <[email protected]>
    Signed-off-by: Christian Brabandt <[email protected]>

diff --git a/src/gui_gtk4_f.c b/src/gui_gtk4_f.c
index 7306d78c2..4bd22db3f 100644
--- a/src/gui_gtk4_f.c
+++ b/src/gui_gtk4_f.c
@@ -262,14 +262,26 @@ vim_form_measure(
        int             *natural_baseline)
 {
     if (orientation == GTK_ORIENTATION_VERTICAL)
+    {
        // Set minimum height of form widget to 4 rows.
-       *minimum = *natural = gui.char_height * 4;
+       if (minimum != NULL)
+           *minimum  = gui.char_height * 4;
+       if (natural != NULL)
+           *natural = gui.char_height * 4;
+    }
     else
+    {
        // Set minimum width of form widget to 10 columns.
-       *minimum = *natural = gui.char_width * 10;
+       if (minimum != NULL)
+           *minimum  = gui.char_width * 10;
+       if (natural != NULL)
+           *natural = gui.char_width * 10;
+    }
 
-    *minimum_baseline = -1;
-    *natural_baseline = -1;
+    if (minimum_baseline != NULL)
+       *minimum_baseline = -1;
+    if (natural_baseline != NULL)
+       *natural_baseline = -1;
 }
 
 
diff --git a/src/version.c b/src/version.c
index 7e6c274f1..56f8a6590 100644
--- a/src/version.c
+++ b/src/version.c
@@ -759,6 +759,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    655,
 /**/
     654,
 /**/

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/vim_dev/E1wZZFd-000xrz-Oe%40256bit.org.

Raspunde prin e-mail lui