Re: PATCH: gnome-desktop
- From: jacob berkman <jacob ximian com>
- To: Richard Hestilow <hestilow ximian com>
- Cc: GNOME Desktop Hackers <desktop-devel-list gnome org>
- Subject: Re: PATCH: gnome-desktop
- Date: 12 Mar 2002 11:01:59 -0500
On Mon, 2002-03-11 at 22:00, Richard Hestilow wrote:
> This patch checks for NULL before g_strchomp-ing a value in
> gnome-desktop-item. Without it, I get 9 billion warnings when running
> control center. May I commit?
> Index: gnome-desktop-item.c
> ===================================================================
> RCS file: /cvs/gnome/gnome-desktop/libgnome-desktop/gnome-desktop-item.c,v
> retrieving revision 1.93
> diff -u -r1.93 gnome-desktop-item.c
> --- gnome-desktop-item.c 1 Mar 2002 00:34:07 -0000 1.93
> +++ gnome-desktop-item.c 12 Mar 2002 03:00:14 -0000
> @@ -2841,13 +2841,14 @@
> return;
> }
> val = decode_string (value, encoding, locale);
> - g_strchomp (val);
>
> /* Ignore this key, it's whacked */
> if (val == NULL) {
> g_free (locale);
> return;
> }
> + else
> + g_strchomp (val);
the 'else' above is unneeded.
jacob
--
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]