Merge pull request #70865 from bruvzg/fd_crash

Fix file dialog crash on forward click when history is empty.
This commit is contained in:
Rémi Verschelde 2023-01-03 12:41:10 +01:00
commit 55ef815472
No known key found for this signature in database
GPG Key ID: C3336907360768E1
2 changed files with 2 additions and 2 deletions

View File

@ -1500,7 +1500,7 @@ void EditorFileDialog::_go_back() {
}
void EditorFileDialog::_go_forward() {
if (local_history_pos == local_history.size() - 1) {
if (local_history_pos >= local_history.size() - 1) {
return;
}

View File

@ -411,7 +411,7 @@ void FileDialog::_go_back() {
}
void FileDialog::_go_forward() {
if (local_history_pos == local_history.size() - 1) {
if (local_history_pos >= local_history.size() - 1) {
return;
}