Branch: refs/heads/master Author: Colomban Wendling ban@herbesfolles.org Committer: Colomban Wendling ban@herbesfolles.org Date: Thu, 07 Aug 2014 13:14:22 UTC Commit: a26bdd628f7a7d6a5937195083b7829be09b1a81 https://github.com/geany/geany/commit/a26bdd628f7a7d6a5937195083b7829be09b1a...
Log Message: ----------- Fix crash when closing a document with visible infobars
Apparently the ::unrealize symbol is sent too late, after we destroyed the widget and freed the GeanyDocument, and some signals like ::focus-in-event can still be fired on the widget after that.
So, properly use the ::destroy signal that is supposed to be fired when others should release references to that instance.
Modified Paths: -------------- src/document.c
Modified: src/document.c 2 lines changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -3215,7 +3215,7 @@ 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_object(bar, "unrealize", G_CALLBACK(gtk_widget_grab_focus), doc->editor->sci, + g_signal_connect_object(bar, "destroy", 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).