mirror of
https://github.com/godotengine/godot.git
synced 2024-12-15 10:12:40 +08:00
Merge pull request #49993 from groud/fix_debbuger_crash
Fixes crash in case no column in tree is expanded and has minimum size
This commit is contained in:
commit
76ba2ffef1
@ -3885,8 +3885,11 @@ int Tree::get_column_width(int p_column) const {
|
||||
}
|
||||
|
||||
ERR_FAIL_COND_V(expanding_columns == 0, -1); // shouldn't happen
|
||||
|
||||
return expand_area * get_column_minimum_width(p_column) / expanding_total;
|
||||
if (expanding_total == 0) {
|
||||
return 0;
|
||||
} else {
|
||||
return expand_area * get_column_minimum_width(p_column) / expanding_total;
|
||||
}
|
||||
} else {
|
||||
return get_column_minimum_width(p_column);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user