Skip to content

Commit

Permalink
Tidepool: fix null pointer error
Browse files Browse the repository at this point in the history
  • Loading branch information
jamorham committed Nov 29, 2018
1 parent a094794 commit 8deb3d2
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,6 @@ private static void startSession(final Session session, boolean fromUi) {
session.authReply.userid, BuildConfig.APPLICATION_ID, 1);

datasetCall.enqueue(new TidepoolCallback<List<MDatasetReply>>(session, "Get Open Datasets", () -> {
UserError.Log.d(TAG, "Existing Dataset: " + session.datasetReply.getUploadId());

if (session.datasetReply == null) {
status("New data set");
if (fromUi) {
Expand All @@ -199,6 +197,7 @@ private static void startSession(final Session session, boolean fromUi) {
call.enqueue(new TidepoolCallback<MDatasetReply>(session, "Open New Dataset", () -> doUpload(session))
.setOnFailure(TidepoolUploader::releaseWakeLock));
} else {
UserError.Log.d(TAG, "Existing Dataset: " + session.datasetReply.getUploadId());
// TODO: Wouldn't need to do this if we could block on the above `call.enqueue`.
// ie, do the openDataSet conditionally, and then do `doUpload` either way.
status("Appending");
Expand Down

0 comments on commit 8deb3d2

Please sign in to comment.