Avoid inadvertently destroying a shared PangoContext on GTK2

wxMemoryDC and wxScreenDC dtors were freeing a context they didn't own, potentially
causing a crash. Fixed by having the base wxWindowDC dtor free the context.
See #18566
This commit is contained in:
Paul Cornett
2019-11-07 11:26:10 -08:00
parent 6878a46725
commit e87ea7389b
4 changed files with 8 additions and 3 deletions

View File

@@ -2629,6 +2629,7 @@ public:
m_window = window;
m_context = window->GTKGetPangoDefaultContext();
g_object_ref(m_context);
m_layout = pango_layout_new( m_context );
m_fontdesc = pango_font_description_copy(gtk_widget_get_style(widget)->font_desc);