We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8d54a9c commit f2f3db3Copy full SHA for f2f3db3
firebase-crashlytics/src/main/java/com/google/firebase/crashlytics/internal/model/CrashlyticsReport.java
@@ -164,9 +164,11 @@ public CrashlyticsReport withNdkPayload(@NonNull FilesPayload filesPayload) {
164
@NonNull
165
public CrashlyticsReport withSessionEndFields(
166
long endedAt, boolean isCrashed, @Nullable String userId) {
167
- return toBuilder()
168
- .setSession(getSession().withSessionEndFields(endedAt, isCrashed, userId))
169
- .build();
+ final Builder builder = toBuilder();
+ if (getSession() != null) {
+ builder.setSession(getSession().withSessionEndFields(endedAt, isCrashed, userId));
170
+ }
171
+ return builder.build();
172
}
173
174
@AutoValue
0 commit comments