Skip to content

Commit

Permalink
Add null checks.
Browse files Browse the repository at this point in the history
  • Loading branch information
daniloercoli committed Oct 12, 2016
1 parent a90fae9 commit 1aaeebe
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,11 @@ private void handleDefaultPush(String from, @NonNull Bundle data) {

private void trySaveNoteIfNotAlreadyInBucket(Bundle data) {
if (SimperiumUtils.getNotesBucket() != null) {
if (data == null) {
AppLog.e(T.NOTIFS, "Bundle is null! Cannot read '" + PUSH_ARG_NOTE_ID +"'.");
return;
}

String noteId = data.getString(PUSH_ARG_NOTE_ID, "");
try {
SimperiumUtils.getNotesBucket().get(noteId);
Expand Down

0 comments on commit 1aaeebe

Please sign in to comment.