mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
fix: work around a null scoped_ptr dereference (#19366)
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.
This commit is contained in:
committed by
John Kleinschmidt
parent
1655976841
commit
0491abf4cc
@@ -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)));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user