Fix iloop race when using AddCommandListener and SourceMod unloads (bug 4077, r=pred).
This commit is contained in:
		
							parent
							
								
									528bbe0116
								
							
						
					
					
						commit
						5111b4799c
					
				@ -156,7 +156,10 @@ class GenericCommandHooker : public IConCommandLinkListener
 | 
			
		||||
		while (iter != vtables.end())
 | 
			
		||||
		{
 | 
			
		||||
			if ((*iter).refcount)
 | 
			
		||||
			{
 | 
			
		||||
				iter++;
 | 
			
		||||
				continue;
 | 
			
		||||
			}
 | 
			
		||||
			/* Damn it. This event happens AFTER the plugin has unloaded!
 | 
			
		||||
			 * There's two options. Remove the hook now and hope SH's memory
 | 
			
		||||
			 * protection will prevent a crash. Otherwise, we can wait until
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user