diff --git a/matrixConsole/View/CustomImageView.m b/matrixConsole/View/CustomImageView.m index b62ecea2c..ca8ed808a 100644 --- a/matrixConsole/View/CustomImageView.m +++ b/matrixConsole/View/CustomImageView.m @@ -473,6 +473,13 @@ } - (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]; if (progressNumber) {