[geany/geany] 4a304e: Fix critical when right-clicking on the document notebook outside a tab

Colomban Wendling git-noreply at xxxxx
Mon Dec 4 02:22:52 UTC 2017


Branch:      refs/heads/master
Author:      Colomban Wendling <ban at herbesfolles.org>
Committer:   Colomban Wendling <ban at herbesfolles.org>
Date:        Mon, 04 Dec 2017 02:22:52 UTC
Commit:      4a304e983c63cd4fc5c8c621e9159bc7ef4cd956
             https://github.com/geany/geany/commit/4a304e983c63cd4fc5c8c621e9159bc7ef4cd956

Log Message:
-----------
Fix critical when right-clicking on the document notebook outside a tab


Modified Paths:
--------------
    src/notebook.c

Modified: src/notebook.c
2 lines changed, 1 insertions(+), 1 deletions(-)
===================================================================
@@ -503,7 +503,7 @@ static void show_tab_bar_popup_menu(GdkEventButton *event, GeanyDocument *doc)
 	gtk_widget_show(menu_item);
 	gtk_container_add(GTK_CONTAINER(menu), menu_item);
 	g_signal_connect(menu_item, "activate", G_CALLBACK(on_close_documents_right_activate), doc);
-	gtk_widget_set_sensitive(GTK_WIDGET(menu_item), has_tabs_on_right(doc));
+	gtk_widget_set_sensitive(GTK_WIDGET(menu_item), doc != NULL && has_tabs_on_right(doc));
 
 	menu_item = ui_image_menu_item_new(GTK_STOCK_CLOSE, _("C_lose All"));
 	gtk_widget_show(menu_item);



--------------
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