[vte] draw: Fix a thinko



commit a4e9f0a9d35f6820876d5aab21729232e34253b4
Author: Christian Persch <chpe src gnome org>
Date:   Sat Jul 18 13:52:55 2020 +0200

    draw: Fix a thinko
    
    Don't overwrite constructed data, and don't run the destructor twice.
    Regression introduced in commit 9c9d9a44c045b16685061fc0380bcc2d86634011.
    
    Fixes: https://gitlab.gnome.org/GNOME/vte/-/issues/267

 src/fonts-pangocairo.cc | 8 --------
 1 file changed, 8 deletions(-)
---
diff --git a/src/fonts-pangocairo.cc b/src/fonts-pangocairo.cc
index fabecf66..5592a4f7 100644
--- a/src/fonts-pangocairo.cc
+++ b/src/fonts-pangocairo.cc
@@ -220,9 +220,6 @@ FontInfo::FontInfo(PangoContext *context)
                          "vtepangocairo: %p allocating FontInfo\n",
                          (void*)this);
 
-        // FIXME: placement new
-        memset(m_ascii_unistr_info, 0, sizeof(m_ascii_unistr_info));
-
        m_layout = vte::glib::take_ref(pango_layout_new(context));
 
        auto tabs = pango_tab_array_new_with_positions(1, FALSE, PANGO_TAB_LEFT, 1);
@@ -245,8 +242,6 @@ FontInfo::~FontInfo()
        g_hash_table_remove(s_font_info_for_context,
                             pango_layout_get_context(m_layout.get()));
 
-       vteunistr i;
-
 #ifdef VTE_DEBUG
        _vte_debug_print (VTE_DEBUG_PANGOCAIRO,
                          "vtepangocairo: %p freeing font_info.  coverages %d = %d + %d + %d\n",
@@ -259,9 +254,6 @@ FontInfo::~FontInfo()
 
        g_string_free(m_string, true);
 
-       for (i = 0; i < G_N_ELEMENTS(m_ascii_unistr_info); i++)
-               m_ascii_unistr_info[i].~UnistrInfo();
-
        if (m_other_unistr_info) {
                g_hash_table_destroy(m_other_unistr_info);
        }


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