[gtk+] textview: Fix memory handling



commit 5b8b892dd6983f5c0cd94cb60e4ec5c25a4fc7c8
Author: Matthias Clasen <mclasen redhat com>
Date:   Fri Oct 6 23:06:52 2017 -0400

    textview: Fix memory handling
    
    When cleaning up the text appearance struct, we forgot
    to add the new strikethrough_rgba member to the copy
    function.

 gtk/gtktextlayout.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtktextlayout.c b/gtk/gtktextlayout.c
index 75c37a5..564d1be 100644
--- a/gtk/gtktextlayout.c
+++ b/gtk/gtktextlayout.c
@@ -1549,6 +1549,9 @@ gtk_text_attr_appearance_new (const GtkTextAppearance *appearance)
   if (appearance->underline_rgba)
     result->appearance.underline_rgba = gdk_rgba_copy (appearance->underline_rgba);
 
+  if (appearance->strikethrough_rgba)
+    result->appearance.strikethrough_rgba = gdk_rgba_copy (appearance->strikethrough_rgba);
+
   return (PangoAttribute *)result;
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]