Merge pull request #500 from L4r0x/table-mem-leak
Fix memory leak in uiTable setEditable on unix.
This commit is contained in:
commit
34d1d0ac48
|
@ -62,6 +62,7 @@ static void setEditable(uiTableModel *m, GtkTreeIter *iter, int modelColumn, Gtk
|
||||||
// TODO avoid the need for this
|
// TODO avoid the need for this
|
||||||
path = gtk_tree_model_get_path(GTK_TREE_MODEL(m), iter);
|
path = gtk_tree_model_get_path(GTK_TREE_MODEL(m), iter);
|
||||||
row = gtk_tree_path_get_indices(path)[0];
|
row = gtk_tree_path_get_indices(path)[0];
|
||||||
|
gtk_tree_path_free(path);
|
||||||
editable = uiprivTableModelCellEditable(m, row, modelColumn) != 0;
|
editable = uiprivTableModelCellEditable(m, row, modelColumn) != 0;
|
||||||
g_object_set(r, prop, editable, NULL);
|
g_object_set(r, prop, editable, NULL);
|
||||||
}
|
}
|
||||||
|
@ -256,6 +257,7 @@ static void progressBarColumnDataFunc(GtkTreeViewColumn *c, GtkCellRenderer *r,
|
||||||
// TODO avoid the need for this
|
// TODO avoid the need for this
|
||||||
path = gtk_tree_model_get_path(GTK_TREE_MODEL(m), iter);
|
path = gtk_tree_model_get_path(GTK_TREE_MODEL(m), iter);
|
||||||
rc->row = gtk_tree_path_get_indices(path)[0];
|
rc->row = gtk_tree_path_get_indices(path)[0];
|
||||||
|
gtk_tree_path_free(path);
|
||||||
rc->col = p->modelColumn;
|
rc->col = p->modelColumn;
|
||||||
val = (gint *) g_hash_table_lookup(p->t->indeterminatePositions, rc);
|
val = (gint *) g_hash_table_lookup(p->t->indeterminatePositions, rc);
|
||||||
if (pval == -1) {
|
if (pval == -1) {
|
||||||
|
|
Loading…
Reference in New Issue