Skip to content

Commit 1e3771d

Browse files
authored
Fix possible concurrent error (#493)
1 parent 3b4f9c0 commit 1e3771d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,9 @@ private static void runPendingActions() {
351351
for (Runnable action : runningActions) {
352352
// If postponable callback and current activity should be skipped, then postpone.
353353
if (action instanceof PostponableAction && isActivityClassIgnored(currentActivity)) {
354-
pendingActions.add(action);
354+
synchronized (pendingActions) {
355+
pendingActions.add(action);
356+
}
355357
} else {
356358
action.run();
357359
}

0 commit comments

Comments
 (0)