title: Search Bar Controller - Crash When Searching for Results
body: <p>I am implementing a search bar controller to search a table view. The below method code which performs the search is crashing with the error "-[__NSArrayM rangeOfString:options:]: unrecognized selector sent to instance 0x65558e0'</p>
  
  <p>The locationInfo array is an array containing 26 arrays, each of which contains a number of objects made up of strings.</p>
  
  <p>Can anyone suggest why the code is crashing ?</p>
  
  <p>Thank you.</p>
  
  <pre><code>- (void)handleSearchForTerm:(NSString *)searchTerm
  {
  [self setSavedSearchTerm:searchTerm];
  
  if ([self searchResults] == nil)
  {
      NSMutableArray *array = [[NSMutableArray alloc] init];
      [self setSearchResults:array];
      [array release], array = nil;
  }
  
  [[self searchResults] removeAllObjects];
  
  if ([[self savedSearchTerm] length] != 0)
  {
      for (NSString *currentString in [self locationInfo])
      {
          if ([currentString rangeOfString:searchTerm options:NSCaseInsensitiveSearch].location != NSNotFound)
          {
              [[self searchResults] addObject:currentString];
          }
      }
  }
  }
  </code></pre>