diff options
author | Larry Ewing <lewing@ximian.com> | 2001-09-18 12:00:56 +0800 |
---|---|---|
committer | Larry Ewing <lewing@src.gnome.org> | 2001-09-18 12:00:56 +0800 |
commit | d8f6b5758f42a6d6028e52198c8075d096f6c629 (patch) | |
tree | 96fb2cd0ecd0f83e66e974f370bb3cfba4e6d180 | |
parent | 7c6775102c17cffea667c17fcb8cbc37d75c52d9 (diff) | |
download | gsoc2013-evolution-d8f6b5758f42a6d6028e52198c8075d096f6c629.tar gsoc2013-evolution-d8f6b5758f42a6d6028e52198c8075d096f6c629.tar.gz gsoc2013-evolution-d8f6b5758f42a6d6028e52198c8075d096f6c629.tar.bz2 gsoc2013-evolution-d8f6b5758f42a6d6028e52198c8075d096f6c629.tar.lz gsoc2013-evolution-d8f6b5758f42a6d6028e52198c8075d096f6c629.tar.xz gsoc2013-evolution-d8f6b5758f42a6d6028e52198c8075d096f6c629.tar.zst gsoc2013-evolution-d8f6b5758f42a6d6028e52198c8075d096f6c629.zip |
remove redundant NULL checks since g_free handles NULLs. (e_text_destroy):
2001-09-17 Larry Ewing <lewing@ximian.com>
* gal/e-text/e-text.c (e_text_supply_selection): remove redundant
NULL checks since g_free handles NULLs.
(e_text_destroy): free the selection. It does appear to be a
guarantee that we get a selection-clear event before we are
destroyed.
svn path=/trunk/; revision=12934
-rw-r--r-- | widgets/text/e-text.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/widgets/text/e-text.c b/widgets/text/e-text.c index 225fb610a7..fe2c8cac32 100644 --- a/widgets/text/e-text.c +++ b/widgets/text/e-text.c @@ -471,8 +471,9 @@ e_text_destroy (GtkObject *object) if (text->invisible) gtk_object_unref (GTK_OBJECT(text->invisible)); - if (text->lines) - g_free (text->lines); + g_free (text->lines); + g_free (text->primary_selection); + g_free (text->clipboard_selection); if (text->font) e_font_unref (text->font); @@ -3728,15 +3729,11 @@ e_text_supply_selection (EText *text, guint time, GdkAtom selection, guchar *dat invisible = e_text_get_invisible(text); if (selection == GDK_SELECTION_PRIMARY ) { - if (text->primary_selection) { - g_free (text->primary_selection); - } + g_free (text->primary_selection); text->primary_selection = g_strndup(data, length); text->primary_length = length; } else if (selection == clipboard_atom) { - if (text->clipboard_selection) { - g_free (text->clipboard_selection); - } + g_free (text->clipboard_selection); text->clipboard_selection = g_strndup(data, length); text->clipboard_length = length; } |