Avoid NPE if capture file isn't available

// FREEBIE
fork-5.53.8
Moxie Marlinspike 2017-09-08 11:38:07 -07:00
rodzic afed60f870
commit 79a88f378b
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -322,9 +322,9 @@ public class CreateProfileActivity extends BaseActionBarActivity implements Inje
}
Intent cameraIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
cameraIntent.putExtra(EXTRA_OUTPUT, Uri.fromFile(captureFile));
if (captureFile != null && cameraIntent.resolveActivity(getPackageManager()) != null) {
cameraIntent.putExtra(EXTRA_OUTPUT, Uri.fromFile(captureFile));
extraIntents.add(cameraIntent);
}