[Xfce4-commits] <garcon:master> Leave early if the desktop file has no contents.

Nick Schermer nick at xfce.org
Sat Aug 29 19:02:03 CEST 2009


Updating branch refs/heads/master
         to 43a5189063c323fd6df009e47dc4832bc425cd8d (commit)
       from 5a8f20ce84be1929028d97e11f78195d15571814 (commit)

commit 43a5189063c323fd6df009e47dc4832bc425cd8d
Author: Nick Schermer <nick at xfce.org>
Date:   Sat Aug 29 17:42:50 2009 +0200

    Leave early if the desktop file has no contents.

 garcon/garcon-menu-item.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/garcon/garcon-menu-item.c b/garcon/garcon-menu-item.c
index 6309ee0..a4ad9fa 100644
--- a/garcon/garcon-menu-item.c
+++ b/garcon/garcon-menu-item.c
@@ -551,7 +551,8 @@ garcon_menu_item_new (GFile *file)
   g_return_val_if_fail (G_IS_FILE (file), NULL);
 
   /* Load the contents of the file */
-  if (!g_file_load_contents (file, NULL, &contents, &length, NULL, NULL))
+  if (!g_file_load_contents (file, NULL, &contents, &length, NULL, NULL)
+      || length == 0)
     return NULL;
 
   /* Open the keyfile */



More information about the Xfce4-commits mailing list