mirror of
https://github.com/vector-im/element-ios.git
synced 2024-09-29 15:52:40 +00:00
RoomViewController: Fixed crash on 6+: "Starting the app in portrait, then rotate the device in landscaped" made the app crash.
The reason is that in these conditions, there is no selected room. So, self.previewScrollView is nil
This commit is contained in:
parent
42a86e4130
commit
9d1db3f2ec
1 changed files with 1 additions and 1 deletions
|
@ -366,7 +366,7 @@
|
|||
[self showExpandedHeader:NO];
|
||||
|
||||
// Hide preview header (if any) during device rotation
|
||||
BOOL isPreview = !self.previewScrollView.isHidden;
|
||||
BOOL isPreview = self.previewScrollView && !self.previewScrollView.isHidden;
|
||||
if (isPreview)
|
||||
{
|
||||
[self showPreviewHeader:NO];
|
||||
|
|
Loading…
Reference in a new issue