[geany/geany] 0682a2: Fix crash when quitting with an infobar visible

Colomban Wendling git-noreply at xxxxx
Sat Jul 26 11:36:19 UTC 2014

Branch:      refs/heads/master
Author:      Colomban Wendling <ban at herbesfolles.org>
Committer:   Colomban Wendling <ban at herbesfolles.org>
Date:        Sat, 26 Jul 2014 11:36:19 UTC
Commit:      0682a255853bada9bb5a07a575100925997e1de9

Log Message:
Fix crash when quitting with an infobar visible

When the infobar gets closed/destroyed it tries to focus the possibly
destroyed document, leading to a crash.

Modified Paths:

Modified: src/document.c
3 lines changed, 2 insertions(+), 1 deletions(-)
@@ -3214,7 +3214,8 @@ static gboolean on_sci_key(GtkWidget *widget, GdkEventKey *event, gpointer data)
 static void enable_key_intercept(GeanyDocument *doc, GtkWidget *bar)
 	/* automatically focus editor again on bar close */
-	g_signal_connect_swapped(bar, "unrealize", G_CALLBACK(document_grab_focus), doc);
+	g_signal_connect_object(bar, "unrealize", G_CALLBACK(gtk_widget_grab_focus), doc->editor->sci,
 	g_signal_connect_object(doc->editor->sci, "key-press-event", G_CALLBACK(on_sci_key), bar, 0);

This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).

More information about the Commits mailing list