Skip to content

Commit

Permalink
Publisher should be empty if it doesn't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
NejcZdovc authored and pilgrim-brave committed Apr 15, 2019
1 parent 13cabcd commit b920782
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion components/brave_rewards/browser/rewards_service_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1115,9 +1115,10 @@ void RewardsServiceImpl::OnPublisherActivityInfoLoaded(
ledger::PublisherInfoCallback callback,
uint32_t result,
const std::string& info_json) {
auto publisher = std::make_unique<ledger::PublisherInfo>();
std::unique_ptr<ledger::PublisherInfo> publisher;

if (!info_json.empty()) {
publisher = std::make_unique<ledger::PublisherInfo>();
publisher->loadFromJson(info_json);
}

Expand Down

0 comments on commit b920782

Please sign in to comment.