diff --git a/Riot/ViewController/RoomsViewController.m b/Riot/ViewController/RoomsViewController.m index 53bb95b3d..4c0c16d44 100644 --- a/Riot/ViewController/RoomsViewController.m +++ b/Riot/ViewController/RoomsViewController.m @@ -210,7 +210,12 @@ { if (indexPath.section == recentsDataSource.directorySection) { - [self openPublicRoomAtIndexPath:indexPath]; + // Sanity check + MXPublicRoom *publicRoom = [recentsDataSource.publicRoomsDirectoryDataSource roomAtIndexPath:indexPath]; + if (publicRoom) + { + [self openPublicRoomAtIndexPath:indexPath]; + } } else {