Skip to content

Commit d54b25f

Browse files
committed
Fix crash in ClearCache in some cases
1 parent 2d98714 commit d54b25f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/browser/net_disk_cache_remover.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ void Noop(base::WaitableEvent* completion, int rv) {
3232

3333
void CallDoomAllEntries(Backend** backend, base::WaitableEvent* completion, int rv) {
3434
DCHECK(rv == net::OK);
35-
(*backend)->DoomAllEntries(base::Bind(&Noop, completion));
35+
if (backend && *backend)
36+
(*backend)->DoomAllEntries(base::Bind(&Noop, completion));
3637
}
3738

3839
void ClearHttpDiskCacheOfContext(URLRequestContextGetter* context_getter,

0 commit comments

Comments
 (0)