Don't panic when using nil pointer, close #4168
This commit is contained in:
		
							parent
							
								
									e99c16392f
								
							
						
					
					
						commit
						0bfe4264c0
					
				@ -96,7 +96,7 @@ func (p *processor) Execute(db *DB) {
 | 
			
		||||
	if stmt.Dest != nil {
 | 
			
		||||
		stmt.ReflectValue = reflect.ValueOf(stmt.Dest)
 | 
			
		||||
		for stmt.ReflectValue.Kind() == reflect.Ptr {
 | 
			
		||||
			if stmt.ReflectValue.IsNil() {
 | 
			
		||||
			if stmt.ReflectValue.IsNil() && stmt.ReflectValue.CanAddr() {
 | 
			
		||||
				stmt.ReflectValue.Set(reflect.New(stmt.ReflectValue.Type().Elem()))
 | 
			
		||||
				break
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user