Fixed null pointer while resuming FileListActivity

This commit is contained in:
David A. Velasco 2012-06-22 12:46:46 +02:00
parent f149b3caac
commit b2264dcfa1
2 changed files with 2 additions and 2 deletions

View file

@ -18,7 +18,7 @@
-->
<manifest package="eu.alefzero.owncloud"
android:versionCode="1"
android:versionName="0.1.127B" xmlns:android="http://schemas.android.com/apk/res/android">
android:versionName="0.1.128B" xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.USE_CREDENTIALS" />

View file

@ -301,7 +301,7 @@ public class FileDisplayActivity extends SherlockFragmentActivity implements
// Priority: Intent (here), savedInstanceState (onCreate), root dir (dir is null)
if(getIntent().hasExtra(FileDetailFragment.EXTRA_FILE)){
mCurrentDir = (OCFile) getIntent().getParcelableExtra(FileDetailFragment.EXTRA_FILE);
if(!mCurrentDir.isDirectory()){
if(mCurrentDir != null && !mCurrentDir.isDirectory()){
mCurrentDir = mStorageManager.getFileById(mCurrentDir.getParentId());
}