Branch: refs/heads/master Author: Colomban Wendling ban@herbesfolles.org Committer: Colomban Wendling ban@herbesfolles.org Date: Sat, 26 Jul 2014 11:36:19 UTC Commit: 0682a255853bada9bb5a07a575100925997e1de9 https://github.com/geany/geany/commit/0682a255853bada9bb5a07a575100925997e1d...
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: -------------- src/document.c
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_CONNECT_SWAPPED); 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).