summaryrefslogtreecommitdiff
path: root/editor/editor_run_native.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/editor_run_native.cpp')
-rw-r--r--editor/editor_run_native.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/editor/editor_run_native.cpp b/editor/editor_run_native.cpp
index 5a519a1dbd..4a767621ef 100644
--- a/editor/editor_run_native.cpp
+++ b/editor/editor_run_native.cpp
@@ -43,11 +43,12 @@ void EditorRunNative::_notification(int p_what) {
continue;
Ref<ImageTexture> icon = eep->get_logo();
if (!icon.is_null()) {
- Image im = icon->get_data();
- im.clear_mipmaps();
- if (!im.empty()) {
+ Ref<Image> im = icon->get_data();
+ im = im->duplicate();
+ im->clear_mipmaps();
+ if (!im->empty()) {
- im.resize(16, 16);
+ im->resize(16, 16);
Ref<ImageTexture> small_icon;
small_icon.instance();
small_icon->create_from_image(im, 0);