summaryrefslogtreecommitdiffstats
path: root/chrome_frame
diff options
context:
space:
mode:
authortommi@chromium.org <tommi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-19 01:04:24 +0000
committertommi@chromium.org <tommi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-19 01:04:24 +0000
commitada3d0b2384f7c58b97bdeb41fad00334de3adcb (patch)
treeb6531f891d7d267cba99cb49fa25c8e0883fdd33 /chrome_frame
parent99844692ee805d18d5ee7fd9c62f14d2dffa2e06 (diff)
downloadchromium_src-ada3d0b2384f7c58b97bdeb41fad00334de3adcb.zip
chromium_src-ada3d0b2384f7c58b97bdeb41fad00334de3adcb.tar.gz
chromium_src-ada3d0b2384f7c58b97bdeb41fad00334de3adcb.tar.bz2
Don't access front() if the queue is empty.
TEST=This fixes a crash that I ran into when testing CF. I was using this page: http://testbed.nicon.nl/googlechrome/testcase_googlechrome.asp?cnt=plus BUG=38547 Review URL: http://codereview.chromium.org/1107005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42054 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame')
-rw-r--r--chrome_frame/chrome_frame_delegate.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/chrome_frame/chrome_frame_delegate.h b/chrome_frame/chrome_frame_delegate.h
index f8f812d..d4bdae0 100644
--- a/chrome_frame/chrome_frame_delegate.h
+++ b/chrome_frame/chrome_frame_delegate.h
@@ -197,7 +197,7 @@ template <class T> class TaskMarshallerThroughWindowsMessages
// had remained in the thread queue).
inline bool PopTask(Task* task) {
AutoLock lock(lock_);
- if (task == pending_tasks_.front()) {
+ if (!pending_tasks_.empty() && task == pending_tasks_.front()) {
pending_tasks_.pop();
return true;
}