tl;dr: I fucking suck at coding (fix double free)
MRI: Filesystem: A garbage collected SDL_RWops file handle will call close on itself even if 'close' was explicitly called on it on the script side before.
This commit is contained in:
		
							parent
							
								
									8d67b7c91d
								
							
						
					
					
						commit
						17efcbbbbd
					
				
					 1 changed files with 1 additions and 0 deletions
				
			
		| 
						 | 
					@ -117,6 +117,7 @@ static int SDL_RWopsClose(SDL_RWops *ops)
 | 
				
			||||||
		return -1;
 | 
							return -1;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	int result = PHYSFS_close(f);
 | 
						int result = PHYSFS_close(f);
 | 
				
			||||||
 | 
						ops->hidden.unknown.data1 = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	return (result != 0) ? 0 : -1;
 | 
						return (result != 0) ? 0 : -1;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue