Prevent crash when call set_text() on a removed treeItem
This commit is contained in:
parent
b94eb58d35
commit
7a2831db57
1 changed files with 12 additions and 4 deletions
|
@ -70,19 +70,27 @@ void TreeItem::Cell::draw_icon(const RID &p_where, const Point2 &p_pos, const Si
|
|||
}
|
||||
|
||||
void TreeItem::_changed_notify(int p_cell) {
|
||||
tree->item_changed(p_cell, this);
|
||||
if (tree) {
|
||||
tree->item_changed(p_cell, this);
|
||||
}
|
||||
}
|
||||
|
||||
void TreeItem::_changed_notify() {
|
||||
tree->item_changed(-1, this);
|
||||
if (tree) {
|
||||
tree->item_changed(-1, this);
|
||||
}
|
||||
}
|
||||
|
||||
void TreeItem::_cell_selected(int p_cell) {
|
||||
tree->item_selected(p_cell, this);
|
||||
if (tree) {
|
||||
tree->item_selected(p_cell, this);
|
||||
}
|
||||
}
|
||||
|
||||
void TreeItem::_cell_deselected(int p_cell) {
|
||||
tree->item_deselected(p_cell, this);
|
||||
if (tree) {
|
||||
tree->item_deselected(p_cell, this);
|
||||
}
|
||||
}
|
||||
|
||||
void TreeItem::_change_tree(Tree *p_tree) {
|
||||
|
|
Loading…
Add table
Reference in a new issue