mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-15 14:50:06 +00:00
gtktextview: Avoid calling gdk_rgba_free for NULL values
Related to glib#2908
This commit is contained in:
parent
b710df6f45
commit
9eac7ed8b9
@ -7787,8 +7787,7 @@ gtk_text_view_set_attributes_from_style (GtkTextView *text_view,
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
values->appearance.underline = PANGO_UNDERLINE_NONE;
|
values->appearance.underline = PANGO_UNDERLINE_NONE;
|
||||||
gdk_rgba_free (values->appearance.underline_rgba);
|
g_clear_pointer (&values->appearance.underline_rgba, gdk_rgba_free);
|
||||||
values->appearance.underline_rgba = NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (decoration_line & GTK_CSS_TEXT_DECORATION_LINE_OVERLINE)
|
if (decoration_line & GTK_CSS_TEXT_DECORATION_LINE_OVERLINE)
|
||||||
@ -7802,8 +7801,7 @@ gtk_text_view_set_attributes_from_style (GtkTextView *text_view,
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
values->appearance.overline = PANGO_OVERLINE_NONE;
|
values->appearance.overline = PANGO_OVERLINE_NONE;
|
||||||
gdk_rgba_free (values->appearance.overline_rgba);
|
g_clear_pointer (&values->appearance.overline_rgba, gdk_rgba_free);
|
||||||
values->appearance.overline_rgba = NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (decoration_line & GTK_CSS_TEXT_DECORATION_LINE_LINE_THROUGH)
|
if (decoration_line & GTK_CSS_TEXT_DECORATION_LINE_LINE_THROUGH)
|
||||||
@ -7817,8 +7815,7 @@ gtk_text_view_set_attributes_from_style (GtkTextView *text_view,
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
values->appearance.strikethrough = FALSE;
|
values->appearance.strikethrough = FALSE;
|
||||||
gdk_rgba_free (values->appearance.strikethrough_rgba);
|
g_clear_pointer (&values->appearance.strikethrough_rgba, gdk_rgba_free);
|
||||||
values->appearance.strikethrough_rgba = NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* letter-spacing */
|
/* letter-spacing */
|
||||||
|
Loading…
Reference in New Issue
Block a user