Skip to content

Commit

Permalink
Merge pull request #3294 from deltachat/adb/issue-3288
Browse files Browse the repository at this point in the history
check that getSlideUri() is not null before passing it to ScribbleActivity
  • Loading branch information
adbenitez authored Sep 16, 2024
2 parents ef578da + 884cce3 commit 054902e
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -639,14 +639,12 @@ public void onClick(View v) {
private class EditButtonListener implements View.OnClickListener {
@Override
public void onClick(View v) {
if (Build.VERSION.SDK_INT >= 19) {
Uri imgUri = getSlideUri();
if (imgUri != null) {
Intent intent = new Intent(context, ScribbleActivity.class);
intent.setData(getSlideUri());
intent.setData(imgUri);
((Activity) context).startActivityForResult(intent, ScribbleActivity.SCRIBBLE_REQUEST_CODE);
}
else {
Toast.makeText(context, "Image editing requires Android 4.4 KitKat or newer.", Toast.LENGTH_LONG).show();
}
}
}

Expand Down

0 comments on commit 054902e

Please sign in to comment.