Skip to content

Commit

Permalink
fix: work around a null scoped_ptr dereference
Browse files Browse the repository at this point in the history
This happens occasionally when running the test suite and indicates
that the callback's been reset or the underlying reference has been
released. To workaround, print a warning.
  • Loading branch information
richard-townsend-arm committed Aug 26, 2019
1 parent ee5403d commit 53286ce
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions atom/browser/api/atom_api_session.cc
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,10 @@ void WrapVerifyProc(base::Callback<void(const VerifyRequestParams& request,
base::Callback<void(int)>)> proc,
const VerifyRequestParams& request,
base::OnceCallback<void(int)> cb) {
if (proc.is_null()) {
LOG(ERROR) << "WrapVerifyProc (proc=null)";
return;
}
proc.Run(request, base::AdaptCallbackForRepeating(std::move(cb)));
}

Expand Down

0 comments on commit 53286ce

Please sign in to comment.