Skip to content

Commit 0ad0d41

Browse files
author
Artyom Vlasov
committed
Do not launch share intent for a page that is null
1 parent ff034ae commit 0ad0d41

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

WordPress/src/main/java/org/wordpress/android/viewmodel/pages/PagesViewModel.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,7 @@ class PagesViewModel
572572

573573
private fun copyPageLink(page: Page, context: Context) {
574574
// Get the link to the page
575-
val pageLink = postStore.getPostByLocalPostId(page.localId).link
575+
val pageLink = postStore.getPostByLocalPostId(page.localId)?.link ?: return
576576
ActivityLauncher.openShareIntent(
577577
context,
578578
pageLink,

0 commit comments

Comments
 (0)