diff options
Diffstat (limited to 'editor/editor_run_native.cpp')
-rw-r--r-- | editor/editor_run_native.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/editor/editor_run_native.cpp b/editor/editor_run_native.cpp index 6ce9e5fa6f..854885c707 100644 --- a/editor/editor_run_native.cpp +++ b/editor/editor_run_native.cpp @@ -49,9 +49,7 @@ void EditorRunNative::_notification(int p_what) { im->clear_mipmaps(); if (!im->is_empty()) { im->resize(16 * EDSCALE, 16 * EDSCALE); - Ref<ImageTexture> small_icon; - small_icon.instantiate(); - small_icon->create_from_image(im); + Ref<ImageTexture> small_icon = ImageTexture::create_from_image(im); MenuButton *mb = memnew(MenuButton); mb->get_popup()->connect("id_pressed", callable_mp(this, &EditorRunNative::run_native), varray(i)); mb->connect("pressed", callable_mp(this, &EditorRunNative::run_native), varray(-1, i)); |