[Xfce4-commits] <xfce4-appfinder:master> Avoid segfault when right-clicking a custom command.

Nick Schermer noreply at xfce.org
Sun Apr 22 20:04:01 CEST 2012


Updating branch refs/heads/master
         to c4a1416508e62e20ed1be3ecbe5842bad0155822 (commit)
       from 26389aea18ab966dc960429b9b6c89fb68269a97 (commit)

commit c4a1416508e62e20ed1be3ecbe5842bad0155822
Author: Nick Schermer <nick at xfce.org>
Date:   Sun Apr 22 18:22:26 2012 +0200

    Avoid segfault when right-clicking a custom command.

 src/appfinder-window.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/src/appfinder-window.c b/src/appfinder-window.c
index 2ae7aa4..bb1b537 100644
--- a/src/appfinder-window.c
+++ b/src/appfinder-window.c
@@ -923,6 +923,13 @@ xfce_appfinder_window_popup_menu (GtkWidget           *view,
                           XFCE_APPFINDER_MODEL_COLUMN_TITLE, &title,
                           XFCE_APPFINDER_MODEL_COLUMN_URI, &uri, -1);
 
+      /* custom command don't have an uri */
+      if (uri == NULL)
+        {
+          g_free (title);
+          return FALSE;
+        }
+
       uri_is_local = g_str_has_prefix (uri, "file://");
 
       menu = gtk_menu_new ();


More information about the Xfce4-commits mailing list