Merge pull request #622 from orium/null-ptr-favchan-fix
Fixed null pointer deref when we try to autojoin a channel
This commit is contained in:
		
						commit
						b690098941
					
				
					 1 changed files with 6 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -877,10 +877,15 @@ servlist_server_find (ircnet *net, char *name, int *pos)
 | 
			
		|||
favchannel *
 | 
			
		||||
servlist_favchan_find (ircnet *net, char *channel, int *pos)
 | 
			
		||||
{
 | 
			
		||||
	GSList *list = net->favchanlist;
 | 
			
		||||
	GSList *list;
 | 
			
		||||
	favchannel *favchan;
 | 
			
		||||
	int i = 0;
 | 
			
		||||
 | 
			
		||||
	if (net == NULL)
 | 
			
		||||
		return NULL;
 | 
			
		||||
 | 
			
		||||
	list = net->favchanlist;
 | 
			
		||||
 | 
			
		||||
	while (list)
 | 
			
		||||
	{
 | 
			
		||||
		favchan = list->data;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue