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:
manuroe 2016-04-27 10:41:46 +02:00
parent 42a86e4130
commit 9d1db3f2ec

View file

@ -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];