From 224ca96c57284ffd2a58fcc9803c8d3f1b5424f6 Mon Sep 17 00:00:00 2001 From: volzhs Date: Tue, 29 May 2018 14:13:05 +0900 Subject: [PATCH] Fix index out of size error of image.cpp --- editor/plugins/editor_preview_plugins.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/editor/plugins/editor_preview_plugins.cpp b/editor/plugins/editor_preview_plugins.cpp index ac4166bb98d..d065a756b47 100644 --- a/editor/plugins/editor_preview_plugins.cpp +++ b/editor/plugins/editor_preview_plugins.cpp @@ -97,6 +97,7 @@ Ref EditorTexturePreviewPlugin::generate(const RES &p_from) { if (img.is_null() || img->empty()) return Ref(); + img = img->duplicate(); img->clear_mipmaps(); int thumbnail_size = EditorSettings::get_singleton()->get("filesystem/file_dialog/thumbnail_size");