ankidroid/Anki-Android — pull request #98 by hssm (2013-09-18 10:09:37+00:00)
Title: Fix for issue1834

[Issue 1834](https://code.google.com/p/ankidroid/issues/detail?id=1834)

In the post-execute of the task that builds the deck list and counts, the collection can be null and we get a crash when we try to access it to set the deck in the deck list. I mentioned on the issue tracker at least one way it could end up with a null collection, but it's possible there are others. This adds an additional check to skip the call if it's null. The next time the collection is opened, this handler will run again, so the correct deck will be selected eventually, even if we skip it here.