[glib/glib-2-20] Don't try to ref NULL pointer in g_desktop_app_info_dup()
- From: Matthias Clasen <matthiasc src gnome org>
- To: svn-commits-list gnome org
- Subject: [glib/glib-2-20] Don't try to ref NULL pointer in g_desktop_app_info_dup()
- Date: Sat, 16 May 2009 20:59:24 -0400 (EDT)
commit 56bbed816852c083d46f68f2df597c1b552a2c8a
Author: Paul Pogonyshev <pogonyshev gmx net>
Date: Mon May 4 22:32:35 2009 +0300
Don't try to ref NULL pointer in g_desktop_app_info_dup()
Fixes bug #573246.
---
gio/gdesktopappinfo.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/gio/gdesktopappinfo.c b/gio/gdesktopappinfo.c
index fcd7737..fea0761 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]