prefs-dialog: Fix a crash when removing style schemes
This looks like another old leftover from the move to gtk3
Based on: 11fbe0fe14
Closes: https://github.com/linuxmint/xed/issues/25
This commit is contained in:
parent
98c983f144
commit
e4745e72b7
|
@ -62,7 +62,6 @@
|
|||
|
||||
static GtkWidget *preferences_dialog = NULL;
|
||||
|
||||
|
||||
enum
|
||||
{
|
||||
ID_COLUMN = 0,
|
||||
|
@ -467,10 +466,14 @@ style_scheme_changed (GtkWidget *treeview,
|
|||
XedPreferencesDialog *dlg)
|
||||
{
|
||||
GtkTreePath *path;
|
||||
|
||||
gtk_tree_view_get_cursor (GTK_TREE_VIEW (dlg->priv->schemes_treeview), &path, NULL);
|
||||
|
||||
if (path != NULL)
|
||||
{
|
||||
GtkTreeIter iter;
|
||||
gchar *id;
|
||||
|
||||
gtk_tree_view_get_cursor (GTK_TREE_VIEW (dlg->priv->schemes_treeview), &path, NULL);
|
||||
gtk_tree_model_get_iter (GTK_TREE_MODEL (dlg->priv->schemes_treeview_model), &iter, path);
|
||||
gtk_tree_path_free (path);
|
||||
gtk_tree_model_get (GTK_TREE_MODEL (dlg->priv->schemes_treeview_model), &iter, ID_COLUMN, &id, -1);
|
||||
|
@ -480,6 +483,7 @@ style_scheme_changed (GtkWidget *treeview,
|
|||
set_buttons_sensisitivity_according_to_scheme (dlg, id);
|
||||
|
||||
g_free (id);
|
||||
}
|
||||
}
|
||||
|
||||
static const gchar *
|
||||
|
|
Loading…
Reference in New Issue