Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check that getSlideUri() is not null before passing it to ScribbleActivity #3294

Merged
merged 1 commit into from
Sep 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading