null check when cleaning avatars for muc
This commit is contained in:
		
							parent
							
								
									09276eb396
								
							
						
					
					
						commit
						bf95ef66eb
					
				|  | @ -321,7 +321,10 @@ public class AvatarService implements OnAdvancedStreamFeaturesLoaded { | ||||||
| 		return bitmap; | 		return bitmap; | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	public void clear(MucOptions options) { | 	public void clear(final MucOptions options) { | ||||||
|  | 		if (options == null) { | ||||||
|  | 			return; | ||||||
|  | 		} | ||||||
| 		synchronized (this.sizes) { | 		synchronized (this.sizes) { | ||||||
| 			for (Integer size : sizes) { | 			for (Integer size : sizes) { | ||||||
| 				this.mXmppConnectionService.getBitmapCache().remove(key(options, size)); | 				this.mXmppConnectionService.getBitmapCache().remove(key(options, size)); | ||||||
|  | @ -329,7 +332,7 @@ public class AvatarService implements OnAdvancedStreamFeaturesLoaded { | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	private String key(MucOptions options, int size) { | 	private String key(final MucOptions options, int size) { | ||||||
| 		synchronized (this.sizes) { | 		synchronized (this.sizes) { | ||||||
| 			if (!this.sizes.contains(size)) { | 			if (!this.sizes.contains(size)) { | ||||||
| 				this.sizes.add(size); | 				this.sizes.add(size); | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	 Daniel Gultsch
						Daniel Gultsch