diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2017-12-06 23:46:43 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-06 23:46:43 +0100 |
commit | 9e2fad7e647e67aba90fae60ceb5a709eea68759 (patch) | |
tree | a70482cb4435e29d203f8092938393497c6caa58 /editor/editor_file_system.cpp | |
parent | c2031fc813d4f55a95cfcf702c508e39e1ef099e (diff) | |
parent | 5fbd71af1781b0b808af78ef6ff330086222cd37 (diff) |
Merge pull request #13724 from RayKoopa/editor_file_dialog_context_menu
Add context menu to editor file dialogs
Diffstat (limited to 'editor/editor_file_system.cpp')
-rw-r--r-- | editor/editor_file_system.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/editor/editor_file_system.cpp b/editor/editor_file_system.cpp index 1cc518ff31..d462cce908 100644 --- a/editor/editor_file_system.cpp +++ b/editor/editor_file_system.cpp @@ -1244,8 +1244,10 @@ void EditorFileSystem::update_file(const String &p_file) { if (!FileAccess::exists(p_file)) { //was removed _delete_internal_files(p_file); - memdelete(fs->files[cpos]); - fs->files.remove(cpos); + if (cpos != -1) { // Might've never been part of the editor file system (*.* files deleted in Open dialog). + memdelete(fs->files[cpos]); + fs->files.remove(cpos); + } call_deferred("emit_signal", "filesystem_changed"); //update later return; } |