Browse Source
			
			
			[rmodels] Fix crash when NULL is passed to LoadImageFromCgltfImage (#4563)
			
			
				pull/4565/head
			
			
		 
		
			
				
					
						 Caleb Heydon
					
					11 months ago
						Caleb Heydon
					
					11 months ago
					
						
							committed by
							
								 GitHub
								GitHub
							
						 
					
				 
				
			 
		 
		
			
				
				  
				  No known key found for this signature in database
				  
				  	
						GPG Key ID: B5690EEEBB952194
				  	
				  
				
			
		
		
		
	
		
			  1 changed files with 
2 additions and 
0 deletions
			
		 
		
			
				- 
					
					
					 
					src/rmodels.c
				
					
					
						
							
								
									
										
											
												
	
		
			
				|  |  | @ -5060,6 +5060,8 @@ static Image LoadImageFromCgltfImage(cgltf_image *cgltfImage, const char *texPat | 
		
	
		
			
			|  |  |  | { | 
		
	
		
			
			|  |  |  | Image image = { 0 }; | 
		
	
		
			
			|  |  |  |  | 
		
	
		
			
			|  |  |  | if (cgltfImage == NULL) return image; | 
		
	
		
			
			|  |  |  |  | 
		
	
		
			
			|  |  |  | if (cgltfImage->uri != NULL)     // Check if image data is provided as an uri (base64 or path) | 
		
	
		
			
			|  |  |  | { | 
		
	
		
			
			|  |  |  | if ((strlen(cgltfImage->uri) > 5) && | 
		
	
	
		
			
				|  |  |  |