fix linux slice crash question

This commit is contained in:
alves
2026-03-04 09:59:07 +08:00
parent 770d203242
commit fddb774d4a
2 changed files with 14 additions and 2 deletions

View File

@@ -205,6 +205,9 @@ void PresetComboBox::update_selection()
// A workaround for a set of issues related to text fitting into gtk widgets:
#if defined(__WXGTK20__) || defined(__WXGTK3__)
// Guard: m_widget may not be a GtkCellLayout (e.g. not yet realized, or GtkComboBoxText in Flatpak/GTK3)
if (!m_widget || !GTK_IS_CELL_LAYOUT(m_widget))
return;
GList* cells = gtk_cell_layout_get_cells(GTK_CELL_LAYOUT(m_widget));
// 'cells' contains the GtkCellRendererPixBuf for the icon,