Skip to content

Commit f66f762

Browse files
authored
Merge pull request #19749 from wordpress-mobile/issue/19748-copy-nullable-page-link
Do not launch share intent for a page that is null
2 parents a8e2eb6 + 0ad0d41 commit f66f762

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)