diff --git a/Riot/Modules/MatrixKit/Views/MXKMessageTextView.m b/Riot/Modules/MatrixKit/Views/MXKMessageTextView.m index 6cf574da0..fdbc037d3 100644 --- a/Riot/Modules/MatrixKit/Views/MXKMessageTextView.m +++ b/Riot/Modules/MatrixKit/Views/MXKMessageTextView.m @@ -119,8 +119,11 @@ - (NSAttributedString *)respectPreferredFontForAttributedString:(NSAttributedStr inRange:NSMakeRange(0, workString.length) options:0 usingBlock:^(id _Nullable value, NSRange range, BOOL * _Nonnull stop) { - [workString removeAttribute:NSFontAttributeName range:range]; - [workString addAttribute:NSFontAttributeName value:[(UIFont *)value fontWithSize:preferredFont.pointSize] range:range]; + if ([value isKindOfClass:UIFont.class]) + { + [workString removeAttribute:NSFontAttributeName range:range]; + [workString addAttribute:NSFontAttributeName value:[(UIFont *)value fontWithSize:preferredFont.pointSize] range:range]; + } }]; [workString endEditing]; diff --git a/changelog.d/929.bugfix b/changelog.d/929.bugfix new file mode 100644 index 000000000..b9d142d2e --- /dev/null +++ b/changelog.d/929.bugfix @@ -0,0 +1 @@ +Depuis la gestion dynamique de taille d'affichage dans les salons, l'application plante quand le salon contient un message supprimé. \ No newline at end of file