summaryrefslogtreecommitdiff
path: root/editor/editor_plugin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/editor_plugin.cpp')
-rw-r--r--editor/editor_plugin.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/editor/editor_plugin.cpp b/editor/editor_plugin.cpp
index 639846861b..d9c2a42114 100644
--- a/editor/editor_plugin.cpp
+++ b/editor/editor_plugin.cpp
@@ -133,8 +133,7 @@ Vector<Ref<Texture2D>> EditorInterface::make_mesh_previews(const Vector<Ref<Mesh
Main::iteration();
Ref<Image> img = RS::get_singleton()->texture_2d_get(viewport_texture);
ERR_CONTINUE(!img.is_valid() || img->is_empty());
- Ref<ImageTexture> it(memnew(ImageTexture));
- it->create_from_image(img);
+ Ref<ImageTexture> it = ImageTexture::create_from_image(img);
RS::get_singleton()->free(inst);