core/CConCmdManager.cpp
changeset 503 c4b8f43bded1
parent 500 868e9b19a872
child 504 1d6072ba774e
     1.1 --- a/core/CConCmdManager.cpp	Fri Feb 16 04:16:31 2007 +0000
     1.2 +++ b/core/CConCmdManager.cpp	Fri Feb 16 04:43:48 2007 +0000
     1.3 @@ -245,22 +245,16 @@
     1.4  	List<ConCmdInfo *>::iterator iter = m_CmdList.begin();
     1.5  	ConCmdInfo *pInfo;
     1.6  	bool inserted = false;
     1.7 -	const char *orig;
     1.8 +	const char *orig = NULL;
     1.9  
    1.10 -	if (info->pCmd)
    1.11 -	{
    1.12 -		orig = info->pCmd->GetName();
    1.13 -	}
    1.14 +	orig = info->pCmd->GetName();
    1.15  
    1.16  	/* Insert this into the help list, SORTED alphabetically. */
    1.17  	while (iter != m_CmdList.end())
    1.18  	{
    1.19  		const char *cmd = NULL;
    1.20  		pInfo = (*iter);
    1.21 -		if (pInfo->pCmd)
    1.22 -		{
    1.23 -			cmd = pInfo->pCmd->GetName();
    1.24 -		}
    1.25 +		cmd = pInfo->pCmd->GetName();
    1.26  		if (strcmp(orig, cmd) < 0)
    1.27  		{
    1.28  			m_CmdList.insert(iter, info);
    1.29 @@ -278,7 +272,9 @@
    1.30  
    1.31  void CConCmdManager::RemoveConCmd(ConCmdInfo *info)
    1.32  {
    1.33 -	/* Remove console-specific information */
    1.34 +	/* Remove console-specific information
    1.35 +	 * This should always be true as of right now
    1.36 +	 */
    1.37  	if (info->pCmd)
    1.38  	{
    1.39  		/* Remove from the trie */