[gnome-packagekit/gnome-2-28] Fix a crash where the desktop file that was installed has no root directory. Fixes rh#581682
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-packagekit/gnome-2-28] Fix a crash where the desktop file that was installed has no root directory. Fixes rh#581682
- Date: Wed, 14 Apr 2010 10:02:40 +0000 (UTC)
commit 2ff757fcfbc5692a409f31feed5e534c6c8d0179
Author: Richard Hughes <richard hughsie com>
Date: Wed Apr 14 10:57:44 2010 +0100
Fix a crash where the desktop file that was installed has no root directory. Fixes rh#581682
src/gpk-desktop.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/gpk-desktop.c b/src/gpk-desktop.c
index be5ffb8..7a513b5 100644
--- a/src/gpk-desktop.c
+++ b/src/gpk-desktop.c
@@ -90,6 +90,10 @@ gpk_desktop_get_menu_path_submenu (const gchar *filename, const gchar *menu_file
goto out;
}
directory = gmenu_tree_get_root_directory (tree);
+ if (directory == NULL) {
+ egg_warning ("no directory for %s", menu_file);
+ goto out;
+ }
text = gpk_desktop_directory_get_menu_path (directory, filename);
if (text == NULL) {
egg_debug ("no path for %s", filename);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]