diff options
author | Juan Linietsky <reduzio@gmail.com> | 2015-12-12 19:21:43 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2015-12-12 19:21:43 -0300 |
commit | 9f75dd086ee978b972ce0105fe6dc1f9418c24fb (patch) | |
tree | d6081874239bc8e74113143606da8d435badc46a /tools/editor | |
parent | 6316f8941c5371ecb861041c23c2ae04abf236d5 (diff) |
no more time error, fixes #2892
Diffstat (limited to 'tools/editor')
-rw-r--r-- | tools/editor/editor_file_dialog.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/editor/editor_file_dialog.cpp b/tools/editor/editor_file_dialog.cpp index 7365cf9069..61ad7b6cbb 100644 --- a/tools/editor/editor_file_dialog.cpp +++ b/tools/editor/editor_file_dialog.cpp @@ -6,6 +6,8 @@ #include "editor_resource_preview.h" #include "editor_settings.h" #include "scene/gui/margin_container.h" +#include "os/file_access.h" + EditorFileDialog::GetIconFunc EditorFileDialog::get_icon_func=NULL; EditorFileDialog::GetIconFunc EditorFileDialog::get_large_icon_func=NULL; @@ -194,6 +196,9 @@ void EditorFileDialog::_thumbnail_done(const String& p_path,const Ref<Texture>& void EditorFileDialog::_request_single_thumbnail(const String& p_path) { + if (!FileAccess::exists(p_path)) + return; + EditorResourcePreview::get_singleton()->queue_resource_preview(p_path,this,"_thumbnail_done",p_path); //print_line("want file "+p_path); set_process(true); |