Skip to content

Commit

Permalink
Add null check
Browse files Browse the repository at this point in the history
  • Loading branch information
aditi-bhatia committed May 18, 2024
1 parent f83cca4 commit d766d21
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,9 @@ public static void showReaderComments(
*/
public static void showReaderComments(Context context, long blogId, long postId, DirectOperation
directOperation, long commentId, String interceptedUri, String source) {
if (context == null) {
return;
}
Intent intent = buildShowReaderCommentsIntent(
context,
blogId,
Expand All @@ -257,6 +260,9 @@ public static void showReaderCommentsForResult(

public static void showReaderCommentsForResult(Fragment fragment, long blogId, long postId, DirectOperation
directOperation, long commentId, String interceptedUri, String source) {
if (fragment.getContext() == null) {
return;
}
Intent intent = buildShowReaderCommentsIntent(
fragment.getContext(),
blogId,
Expand Down

0 comments on commit d766d21

Please sign in to comment.