Catrobat/Catroid — pull request #20 by mfellner (2012-07-19 16:54:59+00:00)
Title: Fixed App crash if project cannot be loaded.

There is now a check if ```projectManager.getCurrentProject()``` returns *null* in the *onPostCreate* method of [*MainMenuActivity*](https://github.com/Catrobat/Catroid/blob/master/catroid/src/at/tugraz/ist/catroid/ui/MainMenuActivity.java).
Before, if the project couldn't be loaded because the local file system (SD card) was unavailable, the app crashed. Now [*Utils.checkForSdCard*](https://github.com/Catrobat/Catroid/blob/master/catroid/src/at/tugraz/ist/catroid/ui/MainMenuActivity.java#L193) will be called in ```onResume()``` and the correct error message displayed.

Even though I suggest merging this changeset because of correctness (*getCurrentProject* could always return *null*), I believe that moving the ```Utils.checkForSdCard``` call to *onPostCreate* is also a good idea because *onResume* comes later in the lifecycle. I could do this in another commit.