summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Pogonyshev <pogonyshev@gmx.net>2009-05-04 22:32:35 +0300
committerMatthias Clasen <mclasen@redhat.com>2009-05-16 20:59:14 -0400
commit56bbed816852c083d46f68f2df597c1b552a2c8a (patch)
treeccf288be6132ca9a2adee7745d988f93a5034990
parent9a040209b6fe6fbf5ded7e70cfb6fe36710fc8ea (diff)
Don't try to ref NULL pointer in g_desktop_app_info_dup()
Fixes bug #573246.
-rw-r--r--gio/gdesktopappinfo.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gio/gdesktopappinfo.c b/gio/gdesktopappinfo.c
index fcd77375c..fea076193 100644
--- a/gio/gdesktopappinfo.c
+++ b/gio/gdesktopappinfo.c
@@ -417,7 +417,8 @@ g_desktop_app_info_dup (GAppInfo *appinfo)
new_info->comment = g_strdup (info->comment);
new_info->nodisplay = info->nodisplay;
new_info->icon_name = g_strdup (info->icon_name);
- new_info->icon = g_object_ref (info->icon);
+ if (info->icon)
+ new_info->icon = g_object_ref (info->icon);
new_info->only_show_in = g_strdupv (info->only_show_in);
new_info->not_show_in = g_strdupv (info->not_show_in);
new_info->try_exec = g_strdup (info->try_exec);