Fix crash on upgrade.
Merge remote-tracking branch 'upstream/master'
Merge pull request #569 from dosiecki/master

Android: Fix crash on upgrade.