Check weak ptr before using it

This commit is contained in:
Cheng Zhao 2018-02-22 15:10:33 +09:00
parent 384b03d49b
commit c2aa312e0c

View file

@ -205,7 +205,8 @@ void BrowserWindow::DidFirstVisuallyNonEmptyPaint() {
base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE,
base::Bind([](base::WeakPtr<BrowserWindow> self) {
self->Emit("ready-to-show");
if (self)
self->Emit("ready-to-show");
}, GetWeakPtr()));
}