summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
Diffstat (limited to 'base')
-rw-r--r--base/message_pump_win.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/base/message_pump_win.cc b/base/message_pump_win.cc
index b67c00e..0b52e7b 100644
--- a/base/message_pump_win.cc
+++ b/base/message_pump_win.cc
@@ -84,6 +84,11 @@ void MessagePumpWin::DidProcessMessage(const MSG& msg) {
}
void MessagePumpWin::PumpOutPendingPaintMessages() {
+ // If we are being called outside of the context of Run, then don't try to do
+ // any work.
+ if (!state_)
+ return;
+
// Create a mini-message-pump to force immediate processing of only Windows
// WM_PAINT messages. Don't provide an infinite loop, but do enough peeking
// to get the job done. Actual common max is 4 peeks, but we'll be a little