ohHandleIntent bug


#1

Minor little bug - if you enter a search string that returns no photos (pretty hard to do on Flickr unless you make a typo), it crashes because resultID is null when you try to access get(0);

	ArrayList<GalleryItem> items;
	if (query != null) {
		items = new FlickrFetcher().search(query);
	} else {
		items = new FlickrFetcher().fetchItems();
	}
	
	String resultID = items.get(0).getId();

#2

Hmm, I’m not seeing that. My copy has the following lines:

if (items.size() == 0) 
    return;

String resultId = items.get(0).getId();

The guard prevents an error when items.get(0) is called.


#3

You’re correct. I missed it when I typed in the code.

Thanks