forked from AuroraMiddleware/gtk
Fix messed up refcounting. (#348090, Chris Wilson)
2006-07-20 Matthias Clasen <mclasen@redhat.com> * gtk/gtktextlayout.c (gtk_text_layout_set_contexts): Fix messed up refcounting. (#348090, Chris Wilson)
This commit is contained in:
parent
7014a3b5bb
commit
4e7097ff08
@ -1,5 +1,8 @@
|
||||
2006-07-20 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtktextlayout.c (gtk_text_layout_set_contexts): Fix
|
||||
messed up refcounting. (#348090, Chris Wilson)
|
||||
|
||||
* gtk/gtkicontheme.h:
|
||||
* gtk/gtkicontheme.c (_gtk_icon_theme_ensure_builtin_cache):
|
||||
Export this privately.
|
||||
|
@ -1,5 +1,8 @@
|
||||
2006-07-20 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtktextlayout.c (gtk_text_layout_set_contexts): Fix
|
||||
messed up refcounting. (#348090, Chris Wilson)
|
||||
|
||||
* gtk/gtkicontheme.h:
|
||||
* gtk/gtkicontheme.c (_gtk_icon_theme_ensure_builtin_cache):
|
||||
Export this privately.
|
||||
|
@ -369,17 +369,23 @@ gtk_text_layout_set_contexts (GtkTextLayout *layout,
|
||||
{
|
||||
g_return_if_fail (GTK_IS_TEXT_LAYOUT (layout));
|
||||
|
||||
if (layout->ltr_context)
|
||||
g_object_unref (ltr_context);
|
||||
if (layout->ltr_context != ltr_context)
|
||||
{
|
||||
if (layout->ltr_context)
|
||||
g_object_unref (layout->ltr_context);
|
||||
|
||||
layout->ltr_context = ltr_context;
|
||||
g_object_ref (ltr_context);
|
||||
layout->ltr_context = ltr_context;
|
||||
g_object_ref (layout->ltr_context);
|
||||
}
|
||||
|
||||
if (layout->rtl_context)
|
||||
g_object_unref (rtl_context);
|
||||
if (layout->rtl_context != rtl_context)
|
||||
{
|
||||
if (layout->rtl_context)
|
||||
g_object_unref (layout->rtl_context);
|
||||
|
||||
layout->rtl_context = rtl_context;
|
||||
g_object_ref (rtl_context);
|
||||
layout->rtl_context = rtl_context;
|
||||
g_object_ref (layout->rtl_context);
|
||||
}
|
||||
|
||||
DV (g_print ("invalidating all due to new pango contexts (%s)\n", G_STRLOC));
|
||||
gtk_text_layout_invalidate_all (layout);
|
||||
|
Loading…
Reference in New Issue
Block a user