mirror of
https://github.com/vector-im/element-ios.git
synced 2024-09-30 16:22:39 +00:00
CustomImageView: Fixed crash when the image URL is not valid
This commit is contained in:
parent
e8251c0e05
commit
d5d757fb60
1 changed files with 7 additions and 0 deletions
|
@ -473,6 +473,13 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)updateProgressUI:(NSDictionary*)downloadStatsDict {
|
- (void)updateProgressUI:(NSDictionary*)downloadStatsDict {
|
||||||
|
|
||||||
|
// Sanity check: updateProgressUI may be called while there is no stats available
|
||||||
|
// This happens when the download failed at the very beginning.
|
||||||
|
if (nil == downloadStatsDict) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
NSNumber* progressNumber = [downloadStatsDict valueForKey:kMediaLoaderProgressRateKey];
|
NSNumber* progressNumber = [downloadStatsDict valueForKey:kMediaLoaderProgressRateKey];
|
||||||
|
|
||||||
if (progressNumber) {
|
if (progressNumber) {
|
||||||
|
|
Loading…
Reference in a new issue