From 79a88f378b1e7c2d8d1ef10b71db1919fcf3e0d5 Mon Sep 17 00:00:00 2001 From: Moxie Marlinspike Date: Fri, 8 Sep 2017 11:38:07 -0700 Subject: [PATCH] Avoid NPE if capture file isn't available // FREEBIE --- src/org/thoughtcrime/securesms/CreateProfileActivity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/org/thoughtcrime/securesms/CreateProfileActivity.java b/src/org/thoughtcrime/securesms/CreateProfileActivity.java index 34f58f15e7..15ef4b17aa 100644 --- a/src/org/thoughtcrime/securesms/CreateProfileActivity.java +++ b/src/org/thoughtcrime/securesms/CreateProfileActivity.java @@ -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); }