Resources.Load error

sorry, my english so bad

I dont know this is engine error or i make a mistake.
situation:

public class DiscoveryWindow : EditorWindow
{

this is part of my code so i chenge this
public Texture Logo;

[MenuItem("Window/Window")]
public static void ShowWindow()
{
    GetWindow<DiscoveryWindow>("Saved files");
    ShowWindow(); 
}

    void OnGUI()
    {

        Logo = Resources.Load<Texture>("Folder/image");

        GUILayout.Label(Logo);
    }  

error Texture = null
why metod dont work?

You have an endless recursion. Your “ShowWindow” method calls itself at the end which makes no sense and should actually lead to either a hang or a crash due to a stack overflow. Maybe some other error causes the recursion to error out. You should simply do:

[MenuItem("Window/Window")]
public static void ShowWindow()
{
    GetWindow<DiscoveryWindow>("Saved files");
}

You also might want to load your texture inside OnEnable and not every time OnGUI is called. Also you should use a more descriptive menu item. “Window” is like calling your game “Game”. So there’s Minecraft, Team Fortress and Game.