[shotwell] Fix criticals on right-click



commit 3929fd76688de8a5fcb6951504c26d133d735937
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 fdda43c..a47b37e 100644
--- a/src/Page.vala
+++ b/src/Page.vala
@@ -1289,6 +1289,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]