diff options
author | Matthias Clasen <mclasen@redhat.com> | 2019-06-05 02:49:07 +0000 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2019-06-05 02:49:07 +0000 |
commit | e961943508c92277bd6ebf55fac8306eac3d1510 (patch) | |
tree | 9bc09eb5aa99ebe4bbd75cfd6766ac886f1c5787 /gsk | |
parent | 054b5216a137c4486e561ab4bbcc14c952c43d17 (diff) | |
download | gtk+-e961943508c92277bd6ebf55fac8306eac3d1510.tar.gz |
Fix a refcounting mishap
We were missing a ref, causing caches to go missing
when a window is opened twice.
Diffstat (limited to 'gsk')
-rw-r--r-- | gsk/gl/gskglrenderer.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/gsk/gl/gskglrenderer.c b/gsk/gl/gskglrenderer.c index ab7fcd1f01..9a3bd13e76 100644 --- a/gsk/gl/gskglrenderer.c +++ b/gsk/gl/gskglrenderer.c @@ -2522,11 +2522,11 @@ get_texture_atlases_for_display (GdkDisplay *display) { atlases = gsk_gl_texture_atlases_new (); g_object_set_data_full (G_OBJECT (display), "gsk-gl-texture-atlases", - gsk_gl_texture_atlases_ref (atlases), + atlases, (GDestroyNotify) gsk_gl_texture_atlases_unref); } - return atlases; + return gsk_gl_texture_atlases_ref (atlases); } static GskGLGlyphCache * @@ -2543,11 +2543,11 @@ get_glyph_cache_for_display (GdkDisplay *display, { glyph_cache = gsk_gl_glyph_cache_new (display, atlases); g_object_set_data_full (G_OBJECT (display), "gsk-gl-glyph-cache", - gsk_gl_glyph_cache_ref (glyph_cache), + glyph_cache, (GDestroyNotify) gsk_gl_glyph_cache_unref); } - return glyph_cache; + return gsk_gl_glyph_cache_ref (glyph_cache); } static GskGLIconCache * @@ -2564,11 +2564,11 @@ get_icon_cache_for_display (GdkDisplay *display, { icon_cache = gsk_gl_icon_cache_new (display, atlases); g_object_set_data_full (G_OBJECT (display), "gsk-gl-icon-cache", - gsk_gl_icon_cache_ref (icon_cache), + icon_cache, (GDestroyNotify) gsk_gl_icon_cache_unref); } - return icon_cache; + return gsk_gl_icon_cache_ref (icon_cache); } static gboolean |