Skip to content

Commit

Permalink
fix one crash when add blacklist
Browse files Browse the repository at this point in the history
  • Loading branch information
ykrank committed Mar 7, 2017
1 parent 0e70a7e commit 8a23f11
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ public int getPostFlag(int id, String name) {
}

public void saveBlackList(@NonNull BlackList blackList) {
if (blackList.getAuthorId() <= 0 && TextUtils.isEmpty(blackList.getAuthor())) {
return;
}
BlackList oBlackList = getBlackListDefault(blackList.getAuthorId(), blackList.getAuthor());
if (oBlackList == null) {
getBlackListDao().insert(blackList);
Expand Down

0 comments on commit 8a23f11

Please sign in to comment.