[shotwell/shotwell-0.26] Fix criticals on right-click
- From: Jens Georg <jensgeorg src gnome org>
 
- To: commits-list gnome org
 
- Cc: 
 
- Subject: [shotwell/shotwell-0.26] Fix criticals on right-click
 
- Date: Thu,  9 Nov 2017 11:57:20 +0000 (UTC)
 
commit 9389c1b62f7be8d58b5042eb3d4b9168143a3663
Author: Jens Georg <mail jensge org>
Date:   Sat Sep 23 08:05:29 2017 +0200
    Fix criticals on right-click
    
    Events etc. don't have a context menu so unconditionally trying to add
    one causes criticals.
 src/Page.vala |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/Page.vala b/src/Page.vala
index 7504743..d9a35c1 100644
--- a/src/Page.vala
+++ b/src/Page.vala
@@ -1301,6 +1301,9 @@ public abstract class CheckerboardPage : Page {
     
     private Gtk.Menu page_context_menu;
     public override Gtk.Menu? get_page_context_menu() {
+        if (page_context_menu_path == null)
+            return null;
+
         if (page_context_menu == null) {
             var model = this.builder.get_object (page_context_menu_path)
                 as GLib.MenuModel;
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]