Skip to content

Commit 95d6052

Browse files
authored
Fix NullPointerException from Leanplum.messageBodyFromContext (#462)
1 parent 66bf788 commit 95d6052

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

AndroidSDKCore/src/main/java/com/leanplum/Leanplum.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1336,6 +1336,10 @@ private static MessageArchiveData messageArchiveDataFromContext(ActionContext ac
13361336
@VisibleForTesting
13371337
public static String messageBodyFromContext(ActionContext actionContext) {
13381338
Object messageObject = actionContext.getArgs().get("Message");
1339+
if (messageObject == null) {
1340+
return null;
1341+
}
1342+
13391343
if (messageObject instanceof String) {
13401344
return (String) messageObject;
13411345
} else {

0 commit comments

Comments
 (0)