Merge pull request #19238 from volzhs/fix-image-out-of-size-error

Fix index out of size error of image.cpp
This commit is contained in:
Rémi Verschelde 2018-05-29 08:23:10 +02:00 committed by GitHub
commit e2bf28e805
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -97,6 +97,7 @@ Ref<Texture> EditorTexturePreviewPlugin::generate(const RES &p_from) {
if (img.is_null() || img->empty())
return Ref<Texture>();
img = img->duplicate();
img->clear_mipmaps();
int thumbnail_size = EditorSettings::get_singleton()->get("filesystem/file_dialog/thumbnail_size");