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:
commit
e2bf28e805
1 changed files with 1 additions and 0 deletions
|
@ -97,6 +97,7 @@ Ref<Texture> EditorTexturePreviewPlugin::generate(const RES &p_from) {
|
||||||
if (img.is_null() || img->empty())
|
if (img.is_null() || img->empty())
|
||||||
return Ref<Texture>();
|
return Ref<Texture>();
|
||||||
|
|
||||||
|
img = img->duplicate();
|
||||||
img->clear_mipmaps();
|
img->clear_mipmaps();
|
||||||
|
|
||||||
int thumbnail_size = EditorSettings::get_singleton()->get("filesystem/file_dialog/thumbnail_size");
|
int thumbnail_size = EditorSettings::get_singleton()->get("filesystem/file_dialog/thumbnail_size");
|
||||||
|
|
Loading…
Reference in a new issue