summaryrefslogtreecommitdiffstats
path: root/editor/editor_resource_preview.cpp
diff options
context:
space:
mode:
authorgroud <gilles.roudiere@gmail.com>2018-09-14 13:59:19 +0200
committergroud <gilles.roudiere@gmail.com>2018-09-14 13:59:19 +0200
commit59536b98b91751c524ad3560275ca8d5e4b9ac2a (patch)
treee085ee7b544491d63f690eb0f2078bc2b4e56b4c /editor/editor_resource_preview.cpp
parent028813fb9c307cf732dda8e638cc0efab2c66824 (diff)
downloadredot-engine-59536b98b91751c524ad3560275ca8d5e4b9ac2a.tar.gz
Bugfixes on the filesystem dock
Diffstat (limited to 'editor/editor_resource_preview.cpp')
-rw-r--r--editor/editor_resource_preview.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/editor/editor_resource_preview.cpp b/editor/editor_resource_preview.cpp
index ee528401ad..310c3b3a52 100644
--- a/editor/editor_resource_preview.cpp
+++ b/editor/editor_resource_preview.cpp
@@ -154,7 +154,7 @@ void EditorResourcePreview::_generate_preview(Ref<ImageTexture> &r_texture, Ref<
}
r_texture = generated;
- if (preview_generators[i]->should_generate_small_preview()) {
+ if (r_texture.is_valid() && preview_generators[i]->should_generate_small_preview()) {
int small_thumbnail_size = EditorNode::get_singleton()->get_theme_base()->get_icon("Object", "EditorIcons")->get_width(); // Kind of a workaround to retreive the default icon size
small_thumbnail_size *= EDSCALE;