aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--widgets/text/e-text.c13
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;
}