Fix possible nullpointer in ImportKeysFileFragment

This commit is contained in:
Dominik Schürmann 2014-09-21 23:25:41 +02:00
parent db7da6525e
commit fc4cdaa24b

View File

@ -104,7 +104,7 @@ public class ImportKeysFileFragment extends Fragment {
public void onActivityResult(int requestCode, int resultCode, Intent data) {
switch (requestCode) {
case REQUEST_CODE_FILE: {
if (resultCode == Activity.RESULT_OK && data != null) {
if (resultCode == Activity.RESULT_OK && data != null && data.getData() != null) {
// load data
mImportActivity.loadCallback(new ImportKeysListFragment.BytesLoaderState(null, data.getData()));