FileSystem: Throw exception if openReadRaw fails
This commit is contained in:
		
							parent
							
								
									45a967b3cd
								
							
						
					
					
						commit
						b165638fb3
					
				
					 1 changed files with 3 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -689,7 +689,9 @@ void FileSystem::openReadRaw(SDL_RWops &ops,
 | 
			
		|||
                             bool freeOnClose)
 | 
			
		||||
{
 | 
			
		||||
	PHYSFS_File *handle = PHYSFS_openRead(filename);
 | 
			
		||||
	assert(handle);
 | 
			
		||||
 | 
			
		||||
	if (!handle)
 | 
			
		||||
		throw Exception(Exception::NoFileError, "%s", filename);
 | 
			
		||||
 | 
			
		||||
	initReadOps(handle, ops, freeOnClose);
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue