Skip to content

Commit f9671ba

Browse files
committed
Re-added the outcomeEventsController for public outcome methods
1 parent 607e9ec commit f9671ba

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

OneSignalSDK/onesignal/src/main/java/com/onesignal/OneSignal.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3116,6 +3116,11 @@ public static void sendOutcomeWithValue(@NonNull String name, float value, Outco
31163116
}
31173117

31183118
private static boolean isValidOutcomeEntry(String name) {
3119+
if (outcomeEventsController == null) {
3120+
OneSignal.Log(LOG_LEVEL.ERROR, "Make sure OneSignal.init is called first");
3121+
return false;
3122+
}
3123+
31193124
if (name == null || name.isEmpty()) {
31203125
OneSignal.Log(LOG_LEVEL.ERROR, "Outcome name must not be empty");
31213126
return false;

0 commit comments

Comments
 (0)