Fix the search crash.
Fix the search crash.

vector-im/vector-ios,vector-im/riot-ios,vector-im/riot-ios,vector-im/riot-ios,vector-im/riot-ios,vector-im/riot-ios,vector-im/riot-ios,vector-im/vector-ios,vector-im/vector-ios