GUI Error (386437)

Hi

I am getting the following error:

GUI Error: You are pushing more GUIClips than you are popping. Make sure they are balanced (type:layout)
UnityEngine.GUIUtility:EndGUI(Int32, Int32)

I’m certain it is something I am doing wrong, rather than a bug (Any ideas?):

	private void AddHosts(int windowID)
	{
		try{
				
			// header
			GUILayout.BeginVertical("box");
			GUILayout.Label(" Choose a game from the list below, or start a new game at the bottom.");
			GUILayout.EndVertical();
			
			// list of servers
			GUILayout.BeginVertical("box");
        	
        	Vector2 scrollViewVector = Vector2.zero;
        	
        	scrollViewVector = GUILayout.BeginScrollView(scrollViewVector, GUILayout.Width(Screen.width-60), GUILayout.Height(Screen.height-165));
        	for (int i = 0; i < _hosts.Length; i++)
        	{
            	AddGameRoom(_hosts[i].gameName, _hosts[i].comment, _hosts[i].passwordProtected, _hosts[i].connectedPlayers, i);
        	}
        	
        	GUILayout.EndScrollView();
        	GUILayout.EndVertical();
        	
        	if(GUI.Button(new Rect(348, Screen.height-90,100,30), "New Game"))
			{
				
				
			}
			
			if(GUI.Button(new Rect(18, Screen.height-90,100,30), "Rules"))
			{
				
			}
			
			if(GUI.Button(new Rect(128, Screen.height-90,100,30), "Options"))
			{
				
			}
			
			if(GUI.Button(new Rect(238, Screen.height-90,100,30), "About"))
			{
				
			}
			
		} catch{ /*ignore*/ }
	}
	
	private void AddGameRoom(string GameName, string GameDescription, bool passProtected, int usersConnected, int id)
    {
    	if(usersConnected != 2)
    	{
    		string passProtectedStr = "";
    		if(passProtected == true)
    			passProtectedStr = " [Password Protected]";
    				
       		GUILayout.BeginHorizontal();
       		GUILayout.Label(GameName + passProtectedStr + " - " + GameDescription);
       		GUILayout.Label("");GUILayout.Label("");GUILayout.Label("");GUILayout.Label("");GUILayout.Label("");
        	
       		if(GUILayout.Button("Join Game"))
			{
					
			}
        	
       		GUILayout.EndHorizontal();
    	}
   	}

Sorry about the lengthy code, and appologies if this is in the forums already.

Regards

JT

I resolved this.

_hosts was null!

Ta

JT