[Xfce4-commits] <midori:master> Make sure there are search engines before populating the menu

Christian Dywan noreply at xfce.org
Sat Sep 25 00:18:02 CEST 2010


Updating branch refs/heads/master
         to 4c90286e099987b37a07c51dbf2b0fc47767f3cc (commit)
       from eabf14a6ceb978c7a3692e3e2932179a274db5b9 (commit)

commit 4c90286e099987b37a07c51dbf2b0fc47767f3cc
Author: Christian Dywan <christian at twotoasts.de>
Date:   Fri Sep 24 23:35:01 2010 +0200

    Make sure there are search engines before populating the menu

 midori/midori-view.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/midori/midori-view.c b/midori/midori-view.c
index 8324d6b..5bda435 100644
--- a/midori/midori-view.c
+++ b/midori/midori-view.c
@@ -2233,12 +2233,15 @@ midori_view_populate_popup (MidoriView* view,
     if (!view->link_uri && has_selection)
     {
         GtkWidget* window;
+        KatzeArray* search_engines = NULL;
 
         window = gtk_widget_get_toplevel (GTK_WIDGET (web_view));
         i = 0;
         if (katze_object_has_property (window, "search-engines"))
+            search_engines = katze_object_get_object (window, "search-engines");
+
+        if (search_engines != NULL)
         {
-            KatzeArray* search_engines;
             KatzeItem* item;
             GtkWidget* sub_menu = gtk_menu_new ();
 
@@ -2246,7 +2249,6 @@ midori_view_populate_popup (MidoriView* view,
             gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem), sub_menu);
             gtk_menu_shell_insert (menu_shell, menuitem, 1);
 
-            search_engines = katze_object_get_object (window, "search-engines");
             KATZE_ARRAY_FOREACH_ITEM (item, search_engines)
             {
                 GdkPixbuf* pixbuf;



More information about the Xfce4-commits mailing list