25 lines
901 B
Diff
25 lines
901 B
Diff
diff --git base/message_loop/message_pump_apple.mm base/message_loop/message_pump_apple.mm
|
|
index 1ca1926d0f423..ad88913a3f463 100644
|
|
--- base/message_loop/message_pump_apple.mm
|
|
+++ base/message_loop/message_pump_apple.mm
|
|
@@ -731,7 +731,8 @@ void MessagePumpUIApplication::Detach() {
|
|
#else
|
|
|
|
ScopedPumpMessagesInPrivateModes::ScopedPumpMessagesInPrivateModes() {
|
|
- DCHECK(g_app_pump);
|
|
+ if (!g_app_pump)
|
|
+ return;
|
|
DCHECK_EQ(kNSApplicationModalSafeModeMask, g_app_pump->GetModeMask());
|
|
// Pumping events in private runloop modes is known to interact badly with
|
|
// app modal windows like NSAlert.
|
|
@@ -742,7 +743,8 @@ ScopedPumpMessagesInPrivateModes::ScopedPumpMessagesInPrivateModes() {
|
|
}
|
|
|
|
ScopedPumpMessagesInPrivateModes::~ScopedPumpMessagesInPrivateModes() {
|
|
- DCHECK(g_app_pump);
|
|
+ if (!g_app_pump)
|
|
+ return;
|
|
g_app_pump->SetModeMask(kNSApplicationModalSafeModeMask);
|
|
}
|
|
|