Remove Spawnlists Tab from QMenu.

Need to remove Spawnlists tab from QMenu.
In this topic: http://forum.facepunch.com/showthread.php?t=1276874 there is a answer



local function removeOldTabls()
	for k, v in pairs( g_SpawnMenu.CreateMenu.Items ) do
		if (v.Tab:GetText() == language.GetPhrase("spawnmenu.content_tab") then
			g_SpawnMenu.CreateMenu:CloseTab( v.Tab, true )
		end
	end
end

hook.Add( "PopulateContent", "rb655_bleh", removeOldTabls )


but this code throw error when i try to activate other tabs (Weapons, NPC, Entities), but not with (Save,Dupe)



[ERROR] gamemodes/sandbox/gamemode/spawnmenu/creationmenu/content/contentsidebartoolbox.lua:48: Tried to use invalid object (type Panel) (Object was NULL or not of the right type)
  1. SetText - [C]:-1
   2. fn - gamemodes/sandbox/gamemode/spawnmenu/creationmenu/content/contentsidebartoolbox.lua:48
    3. Call - addons/ulib/lua/ulib/shared/hook.lua:183
     4. OnNodeSelected - gamemodes/sandbox/gamemode/spawnmenu/creationmenu/content/contentsidebar.lua:12
      5. OnNodeSelected - lua/vgui/dtree_node.lua:96
       6. OnNodeSelected - lua/vgui/dtree_node.lua:96
        7. SetSelectedItem - lua/vgui/dtree.lua:139
         8. InternalDoClick - lua/vgui/dtree_node.lua:79
          9. fn - gamemodes/sandbox/gamemode/spawnmenu/creationmenu/content/contenttypes/postprocess.lua:71
           10. Call - addons/ulib/lua/ulib/shared/hook.lua:183
            11. CallPopulateHook - gamemodes/sandbox/gamemode/spawnmenu/creationmenu/content/content.lua:57
             12. Function - gamemodes/sandbox/gamemode/spawnmenu/creationmenu/content/contenttypes/postprocess.lua:82
              13. unknown - gamemodes/sandbox/gamemode/spawnmenu/creationmenu.lua:42


Go to the erroring file and put

if ( !IsValid( node ) ) then return end

to the line 47.

IsValid(node) return true