patch 9.2.0665: GTK4: GTK critical error on exit printed

Commit: 
https://github.com/vim/vim/commit/711ed17ad45f83493ae443f46f84c3920ee7e030
Author: Foxe Chen <[email protected]>
Date:   Wed Jun 17 19:28:30 2026 +0000

    patch 9.2.0665: GTK4: GTK critical error on exit printed
    
    Problem:  GTK4: GTK critical error on exit printed
    Solution: Only remove controller if it is not NULL
              (Foxe Chen).
    
    closes: #20543
    
    Signed-off-by: Foxe Chen <[email protected]>
    Signed-off-by: Christian Brabandt <[email protected]>

diff --git a/src/gui_beval.c b/src/gui_beval.c
index fc653ba4d..c7357fb30 100644
--- a/src/gui_beval.c
+++ b/src/gui_beval.c
@@ -281,7 +281,11 @@ removeEventHandler(BalloonEval *beval)
     GtkEventController *controller;
 
     controller = g_object_get_data(G_OBJECT(target), "beval");
-    gtk_widget_remove_controller(target, controller);
+    if (controller != NULL)
+    {
+       gtk_widget_remove_controller(target, controller);
+       g_object_set_data(G_OBJECT(target), "beval", NULL);
+    }
 #  else
     g_signal_handlers_disconnect_by_func(G_OBJECT(beval->target),
                                         FUNC2GENERIC(target_event_cb),
diff --git a/src/version.c b/src/version.c
index d4bee4d0b..81bbaac75 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 */
+/**/
+    665,
 /**/
     664,
 /**/

-- 
-- 
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/E1wZwC7-002kTZ-Mu%40256bit.org.

Raspunde prin e-mail lui