mirror of
https://github.com/electron/electron.git
synced 2026-01-28 08:48:14 -05:00
Check weak ptr before using it
This commit is contained in:
@@ -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()));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user