mirror of
				https://github.com/commons-app/apps-android-commons.git
				synced 2025-10-30 22:34:02 +01:00 
			
		
		
		
	Uri.parse would throw NullPointerException if the image in MediaDetailFragment was clicked before the image URL is available
This commit is contained in:
		
							parent
							
								
									dc6a3e507b
								
							
						
					
					
						commit
						11ff5fb055
					
				
					 1 changed files with 6 additions and 4 deletions
				
			
		|  | @ -222,10 +222,12 @@ public class MediaDetailFragment extends CommonsDaggerSupportFragment { | |||
| 
 | ||||
|     @OnClick(R.id.mediaDetailImageViewSpacer) | ||||
|     public void launchZoomActivity(View view) { | ||||
|         Context ctx = view.getContext(); | ||||
|         ctx.startActivity( | ||||
|                 new Intent(ctx,ZoomableActivity.class).setData(Uri.parse(media.getImageUrl())) | ||||
|         ); | ||||
|         if (media.getImageUrl() != null) { | ||||
|             Context ctx = view.getContext(); | ||||
|             ctx.startActivity( | ||||
|                 new Intent(ctx, ZoomableActivity.class).setData(Uri.parse(media.getImageUrl())) | ||||
|             ); | ||||
|         } | ||||
|     } | ||||
| 
 | ||||
|     @Override | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Vaibhav
						Vaibhav